-
Notifications
You must be signed in to change notification settings - Fork 716
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
OrTrigger does not work with DateTriggers #427
Comments
put your OrTrigger code below please. |
Not necessary; the analysis sounds correct. This indeed seems like a bug to me. |
I am currently working on the refactoring of the trigger system in APScheduler 4.0. The stateful nature of triggers there solves this problem since |
Come to think of it, this is actually fixable even in v3.x if the logic is changed to only return |
Solved by the addition of stateful triggers (17a353f). |
I create trigger
OrTrigger(DateTrigger(date1), DateTrigger(date2))
.date1
<date2
.Expected Behavior
Trigger fire twice: in
date1
anddate2
.Current Behavior
Trigger fires once: in
date1
.Detailed Description
It occurs because
DateTrigger.get_next_fire_time()
returnsNone
ifprevious_fire_time
is notNone
. If we useOrTrigger
, we passprevious_fire_time
to all included triggers. And all of them returnsNone
after the first fire ofOrTrigge
. So it will never work multiple times.The text was updated successfully, but these errors were encountered: