1for queues with no queue name i.e. queue name = default
2 php artisan queue:work
3 or
4 php artisan queue:listen
5
6for jobs with a queue name. Let's assume i have a queue with name = sendemail
7
8 php artisan queue:listen --queue=sendemail
9
10note:
11queue:work will only work for jobs entries currently in jobs table in database and stop.
12queue:listen will go on processing queues continously, both for current and new entries.
13
14
1//laravel
2//Execute Laravel queues by queue names on coomand line interface->
3// I was using running command
4 'php artisan queue:work'
5// which was not running my queued jobs in jobs table.
6// Then i relaized, it was only working for jobs with queue column value = 'default'
7// and i had given names like sendemail, inboxemail etc.
8
9// So when i changed this other value to 'default' in queue column in jobs table,
10// this job ran instantly as i have opended cli and php artisan queue:work
11// command was active.
12
13//So if you want to run only a specific queue by queue name, run command ->
14 php artisan queue:listen --queue=sendemail
15// or
16 php artisan queue:listen --queue=inboxemail