概念
文档1中有如下几句话:
The first DAG Run is created based on the minimum start_date for the tasks in your DAG. Subsequent DAG Runs are created by the scheduler process, based on your DAG’s schedule_interval, sequentially.
If you run a DAG on a schedule_interval of one day, the run with execution_date 2019-11-21 triggers soon after 2019-11-21T23:59.
Let’s Repeat That, the scheduler runs your job one schedule_interval AFTER the start date, at the END of the period.
其中start_date:调度计划开始时间,静态值
schedule_interval:调度间隔时间
execution_date :任务具体执行时间,动态值
意思就是说调度任务执行时间应该是start_date+schedule_interval。此外,当任务执行过后,start_date配置便不再生效。
airflow会在start_date之后,在满足schedule_interval的前提之下,到达第一个execution_date,但并不会立刻执行,等到达下一个时间点才开始执行任务。如下图所示:


Airflow的DAG运行基于start_date创建,后续由scheduler根据schedule_interval按序触发。调度任务执行时间是start_date+schedule_interval,首次执行在满足间隔后等待下一个时间点。cron表达式用于设置调度,包括分、时、天、月、周,如用-表示区间,*/30表示每30分钟触发等。
最低0.47元/天 解锁文章
3315

被折叠的 条评论
为什么被折叠?



