Laravel queue jobs not running? A checklist from dispatch to worker
Jobs dispatched but never processed, stuck in the jobs table, or running old code? Work through the connection, the queue name, the worker, failed jobs and deploy restarts.
On this page
When a Laravel job “does nothing”, it is stuck at one of five points: it was never queued, it went to a queue no worker listens to, no worker is running, the worker fails the job, or the worker runs old code. Check them in order.
1. Is the job actually queued?
Look at QUEUE_CONNECTION in .env:
syncruns jobs immediately in the same request. Nothing is queued, so no worker is needed (and none will help).databasestores jobs in thejobstable. Create it withphp artisan make:queue-tableand migrate, if it does not exist.redis,sqsand others need the matching configuration inconfig/queue.php.
After changing .env in production, run php artisan config:clear (or config:cache again). A cached config keeps the old connection.
Also check the job class implements ShouldQueue. Without it, dispatch() runs the job synchronously.
2. Is it on the queue the worker listens to?
ProcessInvoice::dispatch($invoice)->onQueue('billing');
A worker started with php artisan queue:work only listens to the default queue. Name every queue, in priority order:
php artisan queue:work --queue=billing,default
For the database driver, you can see where jobs are waiting: select queue, count(*) from jobs group by queue;.
3. Is a worker running?
queue:work is a long-running process. If you started it in an SSH session, it stopped when you logged out. In production run it under a process manager such as Supervisor or systemd, or use Laravel Horizon for Redis. Check with ps aux | grep queue:work.
A job that is dispatched inside a database transaction may also run before the transaction commits and not find its data. Set 'after_commit' => true on the connection, or call ->afterCommit() when dispatching.
4. Is it failing?
php artisan queue:failed
php artisan queue:retry all
Failed jobs go to the failed_jobs table along with the exception. Run a worker in the foreground with -v to watch it happen. Two causes that look like “not running”:
- Timeout and retry_after. If a job runs longer than the connection’s
retry_after, another worker picks it up again.--timeoutmust be a few seconds shorter thanretry_after. - Serialization. Models are re-fetched when the job runs. If the model was deleted, the job fails with
ModelNotFoundException; addpublic $deleteWhenMissingModels = true;when that is expected.
5. Is it running old code?
Workers load your application once and keep it in memory. After every deploy run:
php artisan queue:restart
Otherwise workers keep executing the previous release’s job classes, which looks like your fix “not working”.
Make jobs safe to run twice
Queues deliver at least once. A retry after a timeout, or a webhook that arrives twice, can run the same work again. Make jobs idempotent with ShouldBeUnique, a WithoutOverlapping middleware, or a database check, as described in handling duplicate webhooks.