Last active
September 20, 2019 10:08
-
-
Save vbalagovic/32b69c70d37aa824c90274cbdbdcbeab to your computer and use it in GitHub Desktop.
Script snippet for running laravel queues with pm2 manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pm2 manager setup for laravel worker | |
apps: | |
# Run php artisan queue:listen to execute queue job | |
- script : 'artisan' | |
name : 'laravel-worker' | |
cwd : '/path/to/root/folder' | |
args : 'queue:work --queue=name-of-queue(eg. emails) --sleep=3 --tries=3' | |
interpreter : 'php' | |
# run pm2 start laravel-worker-pm2.yml to start laravel worker with pm2 manager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment