Skip to content

PHP code snippet – How to automatically run queue in laravel?

for queues with no queue name i.e. queue name = default
	php artisan queue:work 
  		or
	php artisan queue:listen
      
for jobs with a queue name. Let's assume i have a queue with name = sendemail

	php artisan queue:listen --queue=sendemail   
    
note: 
queue:work will only work for jobs entries currently in jobs table in database and stop.
queue:listen  will go on processing queues continously, both for current and new entries.
  
  
See also  How to reset a variable in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.