Skip to content

Instantly share code, notes, and snippets.

@erycson
Created February 21, 2021 20:57
Show Gist options
  • Save erycson/4810babe02d29fdeca0fbd6353635732 to your computer and use it in GitHub Desktop.
Save erycson/4810babe02d29fdeca0fbd6353635732 to your computer and use it in GitHub Desktop.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker
[Service]
User=nginx
Group=nginx
Restart=always
ExecStart=/usr/bin/nohup /usr/bin/php /var/app/current/artisan queue:work --tries=3 --max-time=3600 --daemon
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment