Skip to content

Instantly share code, notes, and snippets.

@p34eu
Created February 1, 2017 13:33
Show Gist options
  • Save p34eu/54a4c5f13823f1571ba3d75c14e3f965 to your computer and use it in GitHub Desktop.
Save p34eu/54a4c5f13823f1571ba3d75c14e3f965 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