Run and monitor Laravel Queue using PM2

In most cases you’d use supervisor.d or some other monitoring daemon to after queue worker process in Laravel applications, However the propose of this post is just to say that you can use PM2 to run and monitor your artisan process.

Basically the reason I go with pm2 is that I have few nodejs scripts running on my server so it would be a good reason to use pm2 for running my queue runner.

To get pm2 to run artisan run following command:

This would run a pm2 process named laravel-worker which you can then see in your pm2 list output.

if you are not yet running pm2 in start up make sure you run pm2 startupĀ to ensure your processes run once your machine is rebooted.