You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow user to supply their own croniter object or datetime generator object to DAG
The user could create their own croniter object or their own object which generates python datetimes when creating a DAG, e.g.:
defmy_great_generator(start_time):
# great# codeyieldnext_datetimedt_gen=my_great_generator(datetime.datetime.now())
dag=DAG(
description='does some great code execution on time!',
datetimes_generator=dt_gen
...
)
Use case / motivation
Some jobs need to run at times that don't conform well to a single croniter schedule. You could combine multiple cron strings together or allow users to create their own generator.
This has been replaced by timetables. Feel free to contribute new timetables that supports the generator and croniter cases. The multiple cron use case will be tracked in #24733.
Nobody seems to be particularly motivated to work on this. Feel free to submit a pull request if you read this in the future and are interested in contributing a new timetable.
Allow user to supply their own
croniter
object ordatetime
generator object to DAGThe user could create their own
croniter
object or their own object which generates pythondatetimes
when creating a DAG, e.g.:Use case / motivation
Some jobs need to run at times that don't conform well to a single
croniter
schedule. You could combine multiple cron strings together or allow users to create their own generator.Related Issues
issue 8469
The text was updated successfully, but these errors were encountered: