Scheduled tasks keep quilting at midnight

Aaron Fickes asked on August 9, 2016 16:55

Multiple scheduled tasks quit at midnight and I have to go back in to each task and click save to reenable them for the day. I do not see anything in the task that would make it only run for a day as all of the days are selected in the task.

Thanks, Chris

Correct Answer

Juraj Ondrus answered on August 11, 2016 13:13

Hi, If you are using Kentico 9 - there was, regrettably a bug. So, maybe this is the cause. It was fixed in 9.0.10 hotfix:

"Scheduler - Infinite loop when planning the next run time of scheduled tasks in rare cases Planning of the next run time for scheduled tasks resulted in an infinite loop in rare cases. This could cause very high CPU usage on the server."

This bug occurred mostly around midnight - so, maybe it is preventing the other tasks from being executed too.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Roman Hutnyk answered on August 9, 2016 17:00

Chris, do you have users/sessions at midnight? Kentico will not trigger scheduled task execution if there is no requests.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on August 9, 2016 17:41

Hi Chris

You can configure the scheduler to process tasks regularly according to an automatic internal timer, regardless of website activity. To enable this mode, add the CMSUseAutomaticScheduler key into the /configuration/appSettings section of your web.config file:

<add key="CMSUseAutomaticScheduler" value="true" />

https://docs.kentico.com/display/K9/Configuring+scheduled+task+execution#Configuringscheduledtaskexecution-Settingthetaskexecutiontime

1 votesVote for this answer Mark as a Correct answer

Aaron Fickes answered on August 10, 2016 17:01

Hi Rui,

I have added the key to the web config and the process still failed to continue after midnight. Any other ideas why this may be happening?

Thanks, Chris

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.