If php artisan queue:work succeeds over SSH but queued jobs remain pending, test the cron environment before changing the queue code. Shared-hosting cron often uses a different PHP binary, working directory, PATH, and environment.
Last updated: October 15, 2026.
* * * * * cd /home/account/app && /usr/local/bin/php artisan queue:work --stop-when-empty --max-time=50 --tries=3 >> storage/logs/queue-cron.log 2>&1Replace both paths with values from the hosting control panel. This bounded worker processes available jobs and exits cleanly, which fits cron better than leaving an unmanaged daemon running indefinitely.
Prove that cron starts in the expected environment
First schedule a command that writes the date, pwd, and php -v to a file inside the application’s writable storage directory. An empty log means cron itself, its command syntax, or its path is wrong. A Laravel exception in the log means cron started successfully and the problem is now inside the application.
Confirm production environment variables, file permissions, the configured queue connection, and the database jobs table. Do not use sudo in a hosting-panel cron job.
A control panel may require separate fields for the schedule and command, and some hosts do not accept a full crontab line. Use the panel’s documented format. Run the exact command over SSH from the account user, including the absolute PHP path, before assigning it to cron.
Choose a worker model the host can supervise
Laravel documents --stop-when-empty for processing queued jobs and exiting, and --max-time for recycling a worker after a bounded interval. On a server you control, a process monitor such as Supervisor is preferable because it restarts long-lived workers and keeps latency low.
If you use Laravel’s scheduler, its single cron entry runs schedule:run every minute. Define the queue command with withoutOverlapping() so a slow invocation does not start another copy. Monitor failed_jobs, worker output, queue age, and the time required by the longest job.
Continue with queueing email delivery, PHP execution-time errors, and transactional email APIs.