Laravel Queue and Job

Official Doc: https://laravel.com/docs/5.3/queues#introduction

Command to build job class:

Command to dispatch job:

Command to execute start queue worker:

For Laravel 5.2 or older version

https://stackoverflow.com/questions/37207290/laravel-queue-only-run-one-job

Run queue worker in background

Note:

  • Every time related scripts are changed, the queue worker must be restarted or the job will always read the script in some cache.
  • Don’t use database to save queue data. Performance is bad and there must be some bugs during data conversion. Some data could be missing when sending emails.