Repository navigation
Timetable that runs on multiple cron expressions - #46451
Merged
Merged
Conversation
uranusjr
force-pushed
the
multiple-cron
branch
from
February 5, 2025 07:19
e663620 to
d0247ac
Compare
Member
Author
|
I don’t even think multiple cron expressions can express a bi-weekly schedule though? To be able to identify bi-weekly, you’ll need some way to count weeks, which cron simply does not allow you to. The linked issue does provide a useful example though:
I’ll create some documentation using that instead. |
potiuk
approved these changes
Feb 5, 2025
insomnes
pushed a commit
to insomnes/airflow
that referenced
this pull request
Feb 6, 2025
* Extract cron trigger timetable serde logic * Timetable that runs on multiple cron expressions * Add documentation for MultipleCronTriggerTimetable
niklasr22
pushed a commit
to niklasr22/airflow
that referenced
this pull request
Feb 8, 2025
* Extract cron trigger timetable serde logic * Timetable that runs on multiple cron expressions * Add documentation for MultipleCronTriggerTimetable
ambika-garg
pushed a commit
to ambika-garg/airflow
that referenced
this pull request
Feb 17, 2025
* Extract cron trigger timetable serde logic * Timetable that runs on multiple cron expressions * Add documentation for MultipleCronTriggerTimetable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new
MultipleCronTriggerTimetablethat takes multiple cron expressions, and schedule runs whenever the time matches at least one of the expressions. Internally, this just usesCronTriggerTimetableand check which instance gives the closest “next” run.I specifically choose
CronTriggerTimetable, not the more traditionalCronDataIntervalTimetable, since the latter needs to have data interval logic, and it is very unclear how data interval should be calculated when more than one cron expression is involved.