Beanstalkd to start when the system starts up or reboots , how to uncomment “START yes” on Centos

For php to listen all times, You need to have Supervisord installed then do the following

  • Locate this file supervisord.conf by running this command: find / -name supervisord.conf

  • You get the path like this /etc/supervisord.conf

  • Edit the file sudo nano /etc/supervisord.conf

  • Make autostart=true and autorestart=true

  • At bottom, have something like this

    [program:laravel-queue-listener] command=php

    /var/www/YourProjectNameHere/artisan queue:listen --env=prod --timeout=0

  • Then restart supervisord: sudo service supervisord restart

  • Restart beanstalkd too: sudo service beanstalkd restart

All Queues will be listened automatically without having to run php artisan queue:listen --timeout=0 manually