-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daylight savings bug causes scheduler to terminate when time is set backwards #407
Comments
I got the same issue (scheduler terminated) when the time switched from daylight savings time last Sunday (Berlin time zone), so no jobs were running on Monday. I'm on the latest version of quantum (2.3.4). Any progress on that or ideas how to solve the issue? |
This problem still exists /with a different error though): https://github.com/quantum-elixir/quantum-core/blob/master/lib/quantum/date_library.ex#L19 What would be the expected result?
They also come with different advantages / drawbacks: If one schedules a task that runs once a day and falls into a date time shift, the task is either executed twice (for option 4), never (for option 1) or once (for options 2 & 3). If one schedule s a task that runs every minute, the task is either not executed (for option 1), every minute of the first hour (for option 2), every minute of the second hour (for option 3) or every minute (for option 4). A similar problem arises with gaps, if I schedule a task to run daily at the time of a gap, it would not be executed that day. I personally think option 4 is correct. The is however a huge change since |
We found our jobs not running, and it turned out our Quantum based scheduler had terminated.
Our jobs are configured with
timezone: "Australia/Adelaide",
and Adelaide had daylight savings move the clock backwards one hour yesterday, resulting in ambiguous time:<Ambiguous(#DateTime<2019-04-07 02:00:06.340067+10:30 ACDT Australia/Adelaide> ~ #DateTime<2019-04-07 01:00:06.340067+09:30 ACST Australia/Adelaide>)
Note this is different from #321 where a time does not exist due to moving forward!
This fails to convert to UTC resulting in an error and eventual termination:
I reproduced this by setting my system clock to 1:59am 7th April 2019 and running our app with jobs that start in less than an hour.
We're going to use UTC in our scheduler to work around.
The text was updated successfully, but these errors were encountered: