I am utilizing the scheduled tasks feature of ColdFusion (CF 8) so robustly, that we have had to dedicate multiple servers that do nothing but run scheduled tasks all day long. When Daylight Savings Time hits we always end up running into issues with tasks running early or late because CF8 decides to change the scheduled run time.
For instance, one task runs Daily at 23:20, and on Friday night after the task executed, instead of scheduling the next run for 23:20 EST on Saturday, it scheduled the task for 00:20 EDT on Sunday.
At what point does CF (or the JVM) change the time and why isn't it at 02:00 on the Sunday of the change?
What can I do to avoid this in the future, besides putting my servers into a state which doesn't observe DST?
We're using the JVM that came with CF 8 (1.6.0_04).
Any help is appriciated. Thank you.
Did you ever figure this out? We are using a different JVM than what ships with CF8 (1.6.0_14) and we see the same behavior. It appears to only be the daily frequency jobs. In my case, when we fell back this weekend, I had a job that runs at 12:01am. It ran at 12:01am on Sunday, but then the log shows that it rescheduled it to run at 11:01PM on the same day. So, it's clearly adding 24 hours and then compensating for the hour gained during the switch to Savings time.
When we lose an hour in the spring, it simply does not schedule the jobs for a full day, so a day skips.
Again, I don't think it's a JVM issue, but I can't believe that no one else is having this issue and I can't find anyone talking about it.
Thanks,
Kyle
Hi Kyle,
Well, I'm happy to see that I'm not the only person in the world trying to figure this out, so for that, Thank you.
We have not figured out what to do about this, other than to use GMT and not change the time at all. Since the servers are located in the Eastern Time Zone, that solution makes scheduling new tasks very confusing.
We have noticed that this past weekend, we have no issues with the tasks running late, early, twice or not at all. It only happens in the Spring when we lose an hour. My only other thought is to tell the OS not to adjust the clock automatically, and adjust the clock manually Sunday afternoon after all of the tasks have had their run and when we have a window larger than an hour with nothing scheduled. This way, they're all scheduled properly since CF already adjusted the task for its next run time...Or, do we ever need to adjust the clock in the OS if CF already took the adjustment into consideration?
As of now, I haven't figured anything out for sure, and really don't like testing on production systems. Too bad we can't just turn the change off in CF or Java...or can we?
Did anyone ever figure out how to fix this? This is the first forum/blog posting about this issue that I've found and I've been looking for years.
I am seeing these same exact symptoms. I have 200+ scheduled tasks that run perfectly fine, but twice a year we have issues. It eventually fixes itself, but for the 24-48 hours after a time change it wreaks havoc on me.
Does CF9 fix this? I've read a post on Ben Nadel's log about storing my tasks in the database, but I really don't want to have to go through all of that trouble because of a seemingly simple bug. I guess not many people use Scheduled Tasks like we do.
Here is Ben's post in case you were wondering:
http://www.bennadel.com/blog/2237-Storing-Your-ColdFusion-Scheduled-Ta sks-In-The-Database.htm
Maybe define the current timezone will fix the problem.
Start up CF JVM with the following eg:
JVM Arguments
-server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Duser.timezone=Australia/Sydney
Your timezone parameter will likely differ to Sydney. You may have other JVM settings pertinent to your environment with different perm and garbage collector settings. Can be a good idea to backup your JVM.CONFIG before applying any JVM changes.
HTH, Carl.
North America
Europe, Middle East and Africa
Asia Pacific