[AIRFLOW-1424] add a next_scheduler_run property to DAGs#2457
[AIRFLOW-1424] add a next_scheduler_run property to DAGs#2457ultrabug wants to merge 1 commit intoapache:masterfrom numberly:jira_1424
Conversation
The scheduler's DAG run creation logic can be tricky and one is easily confused with the start_date + interval and period end scheduling way of thinking. It would ease airflow's usage to add a *next_scheduler_run* property to DAGs so that we can very easily see the (un)famous *period end* after which the scheduler will create a new DAG run for our workflows. These patches add such a field to the *dag* table and the DagModel property + scheduler logic to update it when calculated.
Codecov Report
@@ Coverage Diff @@
## master #2457 +/- ##
==========================================
+ Coverage 69.4% 69.42% +0.02%
==========================================
Files 146 146
Lines 11289 11297 +8
==========================================
+ Hits 7835 7843 +8
Misses 3454 3454
Continue to review full report at Codecov.
|
|
Please explain where the user wants to see this and how this is exposed? We already make the following schedule available in templates for operators as "next_execution_date" |
|
Thanks for your reply @bolkedebruin. The 2 main reasons are:
To sum it up, having the "next_execution_date" in the code is cool but your code has to be executed in the first hand to get this information + it is not informative on a user / monitoring perspective. Adding this on the dag table allows to immediately have this information available on the web UI like this: |
|
The dagbag has access to the webserver |
|
and thus can derive this programmatically. No need for a scheduler and database change. |
|
I'm sorry if this sounds obvious to you but would you mind giving a bit more details please guys? Let's say I want this information displayed on the web UI, how would I proceed and avoid that schema change? |
|
Also, would you be interested/okay for a PR adding this field in the web UI please? |
|
I am closing this PR in favour to #2460 which implements the desired information without a schema change. |

Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
The scheduler's DAG run creation logic can be tricky and one is
easily confused with the start_date + interval
and period end scheduling way of thinking.
It would ease airflow's usage to add a next_scheduler_run property to DAGs
so that we can very easily see the (un)famous period end after which
the scheduler will create a new DAG run for our workflows.
These patches add such a field to the dag table and the DagModel
property + scheduler logic to update it when calculated.
Tests
Tests are proposed along this patches.
Commits