I have been searching a lot for a solution until I just gave up…
I want to run
php artisan queue:work --stop-when-empty command every minute in Laravel task scheduler.
I have tried this
but that doesn’t seem to work at all…
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
You are not supposed to run the queue in the scheduler.
The queue should always be up and running (using a process manager, like Supervisor) and pick jobs when they are dispatched (dispatched in a scheduled task or somewhere else, it doesn’t matter).
Here is the documentation on this topic: https://laravel.com/docs/8.x/queues#supervisor-configuration