How to fix an issue with a Sitecore schedule task when it gets skipped in 10 minutes after adding?

523 Views Asked by At

I have a Sitecore agent with the below settings and want it to execute daily:

<agent name="DoSTH_Agent" type="MyPrj.Prj.AgentMail, MyPrj.Prj" method="Run" interval="23:59:59">

But it doesn't execute daily for some reason. I see in the log as follows:

02:00:42 INFO  Scheduler - Adding agent: DoSTH_Agent (interval: 23:59:59)
02:10:39 INFO  Not due: DoSTH Agent
02:10:44 INFO  Scheduler - Skipping inactive agent: DoSTH_Agent

I don't understand why it has been added and then skipped. The agent is added at 2:00 AM everyday then it is skipped after 10 minutes. I expect it to run daily and not to be skipped after 10 minutes.

What is going wrong and where in my setup?

1

There are 1 best solutions below

0
JasonM On

I recommend you change the interval to 31 minutes and then have the task check if the hour is between 2am-3am. If you set the task to 23:59:59 your Sitecore instance needs to stay running without a restart which isn't reliable.