I have got a page which queues up emails in beanstalked.
The script works as intended, the emails get fired when i have a queue listener, ie.
php artisan queue:listen
But when i remove the listener and add it to the crob job
* * * * * /usr/bin/php /var/www/huge/artisan queue:listen
The emails don't get fired. Any ideas?
Using Output In a Script to Show a Running Cron Job You can add a line of code in your existing script to output a result when the script is run. If the result of this command produces an output, then you can use this output to confirm that your cron script is running.
Laravel's command scheduler offers a fresh approach to managing scheduled tasks on your server. The scheduler allows you to fluently and expressively define your command schedule within your Laravel application itself. When using the scheduler, only a single cron entry is needed on your server.
1) You can run php artisan list command in cmd and find your cron. 2) After find your cron, then you can run php artisan yourcron . You can follow this link for more details about cron job. Hope this work for you!
Had this exact same issue the other day, you probably just need to cd in to the directory where Artisan is located first. Try the following:
* * * * * cd /var/www/huge/ && /usr/bin/php artisan queue:listen
Also, are you sure the currently in use PHP CLI is located at /usr/bin and not /usr/local/bin?
If the above doesn't work try:
* * * * * cd /var/www/huge/ && /usr/local/bin/php artisan queue:listen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With