airflow dag scheduler trigger execution_date

删除回忆录丶 提交于 2019-12-11 16:46:57

问题



ENV: https://github.com/puckel/docker-airflow

VERSION :1.8.1-1

Executor : LocalExecutor


DAG SETTING:

 start_date: datetime(2018, 1, 8)
 schedule_interval :  daily 



Current time:[2018-01-11 06:23:00]

Question:

  1. Why the dag d3's run_id=[scheduled__2018-01-11T00:00:00] has not been triggered at the current time[2018-01-11 06:23:00] ?

  2. Current time [2018-01-11 06:23:00] , is there any way to schedule trigger the d3's run_id=[scheduled__2018-01-11T00:00:00] ,not [scheduled__2018-01-10T00:00:00]


回答1:


This behavior is intentional. The d3 DAG run for scheduled__2018-01-11T00:00:00 is expected to kickoff sometime starting 2018-01-12T00:00:00Z when the schedule interval is "complete".

The docs explain this under Scheduling & Triggers:

Note that if you run a DAG on a schedule_interval of one day, the run stamped 2016-01-01 will be trigger soon after 2016-01-01T23:59. In other words, the job instance is started once the period it covers has ended.

Let’s Repeat That The scheduler runs your job one schedule_interval AFTER the start date, at the END of the period.



来源:https://stackoverflow.com/questions/48201192/airflow-dag-scheduler-trigger-execution-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!