I usually use queues to speed up the time that it takes for me to respond to the client. So if I have something heavy that needs to be triggered during the request, but it doesn't have to be included in the response, I push it to the queue. If it is on a scheduled interval, then I leave it as a CRON job since it doesn't affect the request/response cycle.
Aug 8, 2021
1
Level 2
Jobs
I am creating a backend system and it relies on external data that i have to fetch from an API periodically per minute. This data might sometimes take more than a minute to import. I made the use of laravel scheduler to schedule my commands to fetch data. My question is, is it good to dispatch the fetching of data as a job or to execute it right away in schedular withouthOverlap?
Level 61
Please or to participate in this conversation.