We have some scheduled jobs that run every day at various times of the day. These jobs include logging their results like this:
<cflog file="#logname#" text="START #logname#">
<cfoutput>#mid(now(),6,19)# Scheduled Jobs running on Production (#server.Name#)
This past weekend, when the clocks were advanced one hour, all these jobs ran one hour late. Here is some sample output from the above two lines from a job that runs at 00:05 each day. First, just before the time change.
"Information","jrpp-213","03/10/13","00:05:00",,"START scheduledjobs_0005"
"Information","jrpp-213","03/10/13","00:05:00",,"start sheduledjobs_0005"
Next, the first time after the time change. It runs one hour later.
"Information","jrpp-343","03/11/13","01:05:00",,"START scheduledjobs_0005"
"Information","jrpp-343","03/11/13","01:05:00",,"start sheduledjobs_0005"
Then the following day it's back to normal.
"Information","jrpp-111","03/12/13","00:05:00",,"START scheduledjobs_0005"
"Information","jrpp-111","03/12/13","00:05:00",,"start sheduledjobs_0005"
Files produced by these jobs were also timestamped one hour later than when the job was scheduled to run.
Has anyone seen anything similar? Does anyone know what would cause this or how to prevent it? We are running Version 9,0,1,274733.
I've seen this before. The scheduler calculates the next run of a daily task by adding 24 hours to the scheduled start time. In this case, adding 24 hours to 00:00 ST on Sunday puts the next start time at 01:05 DST on Monday. The scheduler corrects itself the next day because it adds 24 hours to the scheduled start time, which is now 00:00 DST.
It's important to handle it this way, because if someone had scheduled a task to run during the missing hour, the task wouldn't run at all on that day. Furthermore, if the task was scheduled to run during the extra hour in the fall, it would actually run twice.