Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

FounderStartup's avatar

How to keep running the QUEUE on server with php artisan queue:work on server ?

To handle email queue , I need to use the command on the terminal ( I am using cpanel )

php artisan queue:work

But as soon as I close the cpanel terminal window , it stops working ? what is the correct way to do it so that QUEUE should keep running ?

0 likes
2 replies
Snapey's avatar
Snapey
Best Answer
Level 122

i've done it on occasion where i can't install supervisor. You have to have a scheduled task that starts the queue worker with the flag -stop-when-empty and then schedule it -without-overlapping

it's a bit of a hack but it means your queue has opportunity to clear once per minute

2 likes

Please or to participate in this conversation.