0

I'm using the ScheduledExecutorService to start multiple tasks every x seconds

eg.

ScheduledExecutorService schedules;
schedules.scheduleAtFixedRate(new UpdateTask(), 0, 10, TimeUnit.SECONDS);

Works perfectly, unless the system changes date "back in time". Because we have a battery less system, our system starts with a wrong date and get the correct time a bit later from an other system.

If they get a correct time in the future, no problem. If they get a time in the past, the scheduled tasks don't run anymore.

Anyway to restart or reset the schedules so they start counting from the new, corrected time?

Frank
  • 5,741
  • 4
  • 28
  • 49
  • 1
    check http://stackoverflow.com/questions/9044423/java-scheduler-which-is-completely-independent-of-system-time-changes – kTT Jun 16 '16 at 09:59

1 Answers1

0

As kTT mentioned this is a problem of 64bit Java Java scheduler which is completely independent of system time changes

So not solved and @kTT and @YoK get the credit!

Community
  • 1
  • 1
Frank
  • 5,741
  • 4
  • 28
  • 49