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

Watheq's avatar
Level 14

I want to auto-start `php artisan queue:work` in the server

If the server stopped or rebooted for whatever reason, I need to start the command php artisan queue:work manually.

I need to automate this command after every startup.

Another question: can I do this in a shared host like GoDaddy?

0 likes
1 reply
Nihir's avatar
Nihir
Best Answer
Level 50

Hi @watheq , You have to try this command nohup php artisan queue:work --daemon & via terminal or you can add in route like this

Route::get('/queue-work', function() {
    Artisan::call('nohup php artisan queue:work --daemon &');
});

Afer the add this section clear your route from server and that just call the route

https://yourdomainname.com/queue-work

Thats it

1 like

Please or to participate in this conversation.