Running laravel queue:work on a shared hosting

lulliezy picture lulliezy · Sep 10, 2017 · Viewed 13k times · Source

I want my laravel queue:work to keep running on a shared hosting, this is a shared hosting (am not on a VPS) I can't install anything because almost all online sources when I was searching for this suggest installing supervisor. So basically I thought I could just create a cron job that checks if queue is not running and starts it, any help on how to go about this because am kinda stuck, thanks.

P.S. Am on a Linux server and Laravel 5.3

Answer

Suresh Velusamy picture Suresh Velusamy · Sep 10, 2017

As you mentioned you are using shared hosting, You follow the below steps.

Step 1. you need to setup your queue driver as database

Step 2 you need to setup a cron job with with the following command php /path/to/application/artisan queue:work --queue=high,default.

You can give a try. I hope it will work.