Running your laravel :queue on background using Supervisor

Alvin Amri
1 min readJul 28, 2020

First, install Supervisor on your machine:

apt-get install supervisor

Go to dir: /etc/supervisor/conf.d/

create your configuration file, e.g your_script_name.conf:

[program:your_script_name]
command=php /var/your-laravel-dir/artisan queue:work
autostart=true
autorestart=true
stderr_logfile=/var/log/long.err.log
stdout_logfile=/var/log/long.out.log

Then tell Supervisor to update it script using:

supervisorctl update

That’s it!

--

--