Skip to content
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

Allow user to supply croniter object, multiple cron strings or generator object to DAG #8835

Open
themantalope opened this issue May 12, 2020 · 4 comments
Labels
AIP-39 Timetables kind:feature Feature Requests

Comments

@themantalope
Copy link

themantalope commented May 12, 2020

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.:

def my_great_generator(start_time):
   # great
   # code
   yield next_datetime

dt_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.

Related Issues
issue 8469

@themantalope themantalope added the kind:feature Feature Requests label May 12, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented May 12, 2020

Thanks for opening your first issue here! Be sure to follow the issue template!

@ashb ashb added the AIP-39 Timetables label Mar 30, 2021
@eladkal
Copy link
Contributor

eladkal commented Jul 7, 2022

FYI @BasPH - related to #24733

@cdchandani
Copy link

Is this feature implemented in airflow? I could see #24733 closed due to being stale , so not sure if it was implemented in some other commits .

@uranusjr
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-39 Timetables kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

5 participants