AtomCoder
6 months ago

Task Scheduling Timing

Posted 6 months ago by AtomCoder

Hi Guys,

I'm just curious to know how the task scheduling works in regards to how a cron job is setup on a server.

For example, I currently have a cron setup on my server that runs every 5 minutes. When ran, it checks my website for any tasks that need to be run. However, most of my tasks are using the ->between('15:00', '15:10') helper to determine if the task is to be run or not. But this means needing extra logic within my command file to prevent multiple emails being sent as this task could be triggered twice within that time slot. (My command sends out emails to my users)

If I were to use the ->at('15:00') helper with my cron job running every 5 minutes, could this potentially fail?

What I mean is, my cron runs every 5 minutes so potentially my task could be triggered at 15:03. Will the task still run in this instance or with it be missed ?

Please sign in or create an account to participate in this conversation.