Scheduled Jobs: Do not run at scheduled time.

Vote:
 

We have two scheduled jobs.  One is scheduled to run at 7:00 AM the other at 7:30 AM.  The first day they run at the times they were scheduled to run.  After that they run at different times.  For example; one job, scheduled for 7:00 AM ran at 9:15 AM and the next day at 4:40 PM.

We have IIS Application Initialization installed on the IIS Server.  Can anyone explain why this is happening?

Thanks for your assistance.

#182592
Sep 25, 2017 18:28
Vote:
 

how do you set scheduling time to execute specificly at 7:00 AM? how long it takes for the job to execute?

#182634
Sep 26, 2017 22:26
Vote:
 

Scheduled tasks are set to run at an interval, e.g. one time every day. When the job has finished it updates "next run" with the interval. That means that if the job starts at 7:00 and ends at 7:02, next run will be sheduled at 7:02 the next day, next day after that 7:04, and so on.
I think that sheduled jobs also depends on the site getting traffic. If there is no traffic, the scheduled job won't run at the scheduled time. But once there is traffic, scheduled jobs that are "late" will run (and after that the interval will be used to set next run). 

#182652
Sep 27, 2017 11:10
Vote:
 

"I think that sheduled jobs also depends on the site getting traffic" - can you show the code where this is decided?

#182655
Sep 27, 2017 11:43
Vote:
 

Nope, but now I took a look in the docs :-)

Because scheduled jobs are executed in the same process as the site, the site's web server must be up and running. To ensure this, use the IIS feature "Application Initialization," or have a site supervisor periodically ping the site. In Azure Web Apps enable "Always On"

http://world.episerver.com/documentation/developer-guides/CMS/scheduled-jobs/

I interpret that to: either have traffic or use other means to stop site from going to sleep.

#182668
Sep 27, 2017 14:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.