Skip to content

Instantly share code, notes, and snippets.

@1242035
Forked from p34eu/queue-main.service
Created September 30, 2017 13:29
Show Gist options
  • Save 1242035/2f230b273ef332eb988e155492350de5 to your computer and use it in GitHub Desktop.
Save 1242035/2f230b273ef332eb988e155492350de5 to your computer and use it in GitHub Desktop.
Laravel queue worker using systemd
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue-main.service
#
# run this command to enable service:
# systemctl enable queue-main.service
[Unit]
Description=Laravel queue worker
[Service]
User=www-data
Group=www-data
Restart=always
ExecStart=/usr/bin/php /path-to/artisan queue:work --daemon --env=production --queue=main --timeout=800
Nice=19
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment