skip to Main Content

I am using plesk for my server management. Yesterday server restarted automatically due to some updated . When my server turned on , it stops to process laravel queues . I run this command on my Laravel-project-root-directory to restart queues manually.
command : nohup php artisan queue:work --daemon &
Can i found a way to automatically run this command on my server on server restart. I am new to plesk & laravel queues.

2

Answers


  1. you need to use supervisor for let the queue running in background on server
    Supervisor

    Login or Signup to reply.
  2. If you can’t run supervisor, you could also use sansdaemon as a solution (https://github.com/orobogenius/sansdaemon).

    once you’ve installed that, you can add a statement to the console/Kernel.php file:

    $schedule->command('queue:work --sansdaemon')->everyMinute()->withoutOverlapping();
    

    all should be working then the moment cron picks up again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search