When we use the
php artisan queue:work command to start the queue worker process, this command runs jobs from the
To run a specific queue in Laravel using the following command, you can add the
--queue option followed by the name of the queue you want to run
php artisan queue:work --queue=queue_name
- You can also specify the number of seconds a job can run before it is released back to the queue using the
--timeoutoption. For example:
php artisan queue:work --queue=emails --timeout=30
- Once you start the queue worker process with the specific queue option, it will continuously process jobs from that queue until you stop the process.
That's it! You can now run a specific queue in Laravel using the php artisan queue:work command with the --queue option.