queue:work in production, listen locally

queue:work is the long-running worker. queue:listen reloads your code each job and is the local command.

For your AI agent

Copies a prompt. Paste it into the AI agent you already have open.

Read https://laravel-vuejs.space/laravel-queue-work-vs-listen.md
queue:work is the long-running worker. queue:listen reloads your code each job and is the local command.
Do not add it to a Cloud release because a forum post listed it.
Do not call queue:work from a controller so a Vue button "starts the worker".
Do not run queue:work in the request that handled the click.
Show the diff. Do not commit.
On this page · 3 sections
  1. The fix
  2. What to avoid
  3. FAQ

People searching “queue:work vs queue:listen” run queue:listen under systemd and then wonder why production is slow. listen boots the framework for every job. work boots once. The queue guide is the job the Vue page polls. This page is the process.

TL;DR

  • queue:work is the long-running worker.
  • queue:listen reloads your code each job and is the local command.
  • Do not add it to a Cloud release because a forum post listed it.
  • Do not call queue:work from a controller so a Vue button “starts the worker”.

Who it's for: Laravel + Vue developers

Applies to: Laravel 13 · Vue 3

The fix#

Local, while you are changing the job class:

shell
php artisan queue:listen

Production:

shell
php artisan queue:work

queue:work does not see new code until the process restarts. On a VPS, php artisan queue:restart after deploy signals those workers. Laravel Cloud skips queue:restart. The deploy guide says so. Do not add it to a Cloud release because a forum post listed it.

What to avoid#

Gotcha

Do not call queue:work from a controller so a Vue button “starts the worker”. The button dispatches a job. A supervisor, or the platform, runs the worker. Do not run queue:work in the request that handled the click.

FAQ#

Should I use queue:work or queue:listen?

queue:work is the long-running worker. queue:listen reloads your code each job and is the local command.

What goes wrong with queue:work vs queue:listen?

Many developers run queue:listen under systemd and then wonder why production is slow. Do not add it to a Cloud release because a forum post listed it.

Found this useful?

Ask questions, share what you built.

Join thousands of Laravel and Vue developers in our Facebook group, or get new posts in your Telegram feed. Sharing this article helps too.

Keep reading

Newsletter

Get the best of Laravel & Vue, once a month.

One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.