I recently setup a Laravel Queue system. The basics are a cronjob calls a command which adds jobs to a queue and calls a second command which sends an email.
The sy
I had JS script running with pm2 (Advanced, production process manager for Node.js) Which was the only one I was running. But now as I got one more process to keep running.
I created process.yml
to run both with a single command.
Check the first one would run php artisan queue: listen
# process.yml at /var/www/ which is root dir of the project
apps:
# Run php artisan queue:listen to execute queue job
- script : 'artisan'
name : 'artisan-queue-listen'
cwd : '/var/www/'
args : 'queue:listen' # or queue:work
interpreter : 'php'
# same way add any other script if any.
Now run:
> sudo pm2 start process.yml
Check more options and feature of pm2