Intervals for Autotask

I'm having some trouble understanding when the Autotask is executed and can't find much information in the docs.

I created an Autotask to be executed with an interval of 7 days. Upon creation, the Autotask was executed after a couple of seconds. Is this correct? I'd rather it not execute until the 7 days are over.

To avoid this immediate execution, I tried creating a new Autotask and pausing the Autotask for a couple of minutes before resuming it. Upon resuming, the Autotask triggered after a couple of seconds. I'm not sure what I'm doing wrong here, would like more information regarding how pausing works as well as how the timing for execution of Autotasks are determined. Thanks a lot!

Hi @blanket1

You are right, we are running autotask immediately after creation when using Timespan option for schedule. This is something that we need to revisit internally.

However, you could try to use Cron instead of using Timespan for schedule.

For example, using the cron expression 0 0 * * 0 would trigger an Autotask every 7 days at 00:00 on Sunday.

Please, let me know if this helps.

Best regards,

1 Like

Hey, thank you for the reply! Cron definitely looks like what I could use. I do have a question regarding pausing for Timespan. How does pausing affect the schedule for Autotasks?

Lets say I create an Autotask to be executed every 10 mins. This Autotask is created at 13:00. The first Autotask trigger goes through at 13:00. I then pause the Autotask at 13:09 and resume it at 13:11. When will the second Autotask trigger be? Will it be at 13:12 or 13:20? Thank you!

Hi @blanket1

Next Autotask would be scheduled at 13:12 based on your example.

There is work in progress that should fix this behaviour but at the moment I am not sure about its release date.


Got it, thanks a lot! Appreciate the help.