Replies: 6 comments
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
I think if For example, for a DAG that is scheduled to run daily, if you enable it today (2020-07-22) and do not want to trigger the most recent run (execution_date = 2020-07-21) immediately, simply set |
Beta Was this translation helpful? Give feedback.
-
That would only work for the first time you enable it. I don't want to have to keep updating the start date if I disable it and enable it at some point after the start date. |
Beta Was this translation helpful? Give feedback.
-
Right. Now I get the point. I think this is an interesting case and requires some change to part of the scheduling logic. I'll work on it. |
Beta Was this translation helpful? Give feedback.
-
Just want to write down my exploration and thoughts which might help if anyone wants to pick it up or discuss it further. I looked into the scheduling logic and it turns out that the behaviour of catching up the most recent run was not designed deliberately. Rather, it is a "side effect" of the fundamental scheduling logic. Airflow scheduler runs like a batch job. For every few seconds, it parses the DAGs and determines the next dag_run (if any) for every DAG. For example, for a DAG scheduled to run hourly Therefore, if we want to prevent the most-recent catchup, we might have to add some more complex logic and modify the DAG model. For example, adding a timestamp to record when a DAG is enabled so that scheduler can skip most-recent run. I'm not sure if it's worth it for this feature. |
Beta Was this translation helpful? Give feedback.
-
For anyone who is interested in this feature check #38168 |
Beta Was this translation helpful? Give feedback.
-
Description
As mentioned in AIRFLOW-1156, I want to add the option to not run the most recent scheduled DAG on enabling.
Use case / motivation
We want to be enable the DAG for future runs, but don't want it to run the most recent task automatically, since there are tasks e.g. sending an email, that needs to be done manually on occasion. We do not want to repeat this task multiple times.
Related Issues
AIRFLOW-1156
Beta Was this translation helpful? Give feedback.
All reactions