Skip navigation
sroberts7101
Currently Being Moderated

Daylight Savings Time; running scheduled tasks on time

Mar 17, 2010 10:55 AM

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.

 
Replies
  • Currently Being Moderated
    Nov 8, 2010 2:10 PM   in reply to sroberts7101

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2012 12:28 PM   in reply to sroberts7101

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2012 7:07 PM   in reply to kylemurphy2009

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points