Cron job scheduler isn't working

We are trying to have a cron expression running at 14:00 UTC every day, the expression goes as follow

0 14 * * *

with our local time, UTC+7 it should have fired at 9 pm here but it never get called.

We also tried to create a new expression, lets say 5 minutes from the testing time, but it also didn't fired at all.

is the cron working as UTC time? if yes why it doesn't work out?

Hey @jarindr_thitadilaka, the cron expression uses UTC time, not local. Also, we've detected an issue in which manual autotask runs do affect the scheduled triggers, so a recent manual run can cause a scheduled one not to run.

Let us know if the cron schedule doesn't kick in at the expected UTC time (with no manual runs in the previous time interval), so we can look into it!

Hello @spalladino you can test it now that it doesn't work.

  • try to create a new cron in this format, x y * * * where x,y can be a time in 5 minutes from the cron creation time.
  • wait for 5 minutes
  • nothing happen

This seems to only be a problem with cron expression, but the timespan works fine.

My cron job doesn't work too. I tried to set time to 14:10 UTC. but when the time come, the cron job hasn't executed.

I've tried a quick test and got the run as expected. Is it possible you're setting x,y in local time as opposed to UTC?

Screenshot from 2021-12-22 13-51-30

@jarindr_thitadilaka @satasuk03 another reason to why the cron is not firing is because we check the time of the last invocation to make sure we don't run the autotask more often than it should be. However, the span for checking the last invocation depends on the frequency of the current expression, which can lead to seemingly missed invocations.

For instance, if you set up a schedule to run at 4.50PM every day, Defender will check that you have no runs since the previous day at that time. If you do, the current run is skipped.

I see that this check may be too aggressive, causing us to skip runs that were originally intended, so let me take this back to the drawing board to see how to best handle it. In the meantime, if you set up a daily schedule, your Autotask should run if you don't trigger any other runs in the previous 24hs.

1 Like

Is there anyway to have the autotask resume its normal schedule?

Hey @Josh_Galbreath, we got a fix in testing for this, should be up and running next week. In the meantime, if you don't execute any manual runs, your autotask should eventually (when the number of minutes between two successive cron executions have passed) resume its normal cron scheduled operations. I can also manually delete past runs for you to speed up this process, if you prefer.

It appeared as if the scheduler was working, but it missed the scheduled time today. Why might this be?

skipped on 27th and today (30th).