I want to run asynchronous Laravel jobs and work forever. As far as I understand, I need to setup Jobs and push them into separate queues.
I have set .env
- QUEUE_DRIVER=database
and run php artisan queue:table
and php artisan migrate
accordingly.
and I have run php artisan make:job MyJob
(at this point queues table is empty though, but I don't know if I did something wrong)
The point I mainly got confused is how is it going to start all the jobs and run them forever, or run the job initially?
As far as I understand, to trigger the job I need to call:
MyFirstJob::dispatch();
but where do I need to call it to work all the time and forever?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2yduTeq
via IFTTT
Aucun commentaire:
Enregistrer un commentaire