【发布时间】:2019-10-12 02:39:24
【问题描述】:
我需要在每月的第 12 天和每月最后一天的前 2 天执行气流相同的任务。
我也在尝试使用宏和execution_date。不知道如何进一步进行。你能帮忙吗?
def check_trigger(execution_date, day_offset, **kwargs):
target_date = execution_date - timedelta(days = day_offset)
return target_date
【问题讨论】:
-
对于不能通过
crontab表达式实现的调度条件,你可以随时依赖programming-logic:skiptask(s)当你不想要的时候运行它们。
标签: airflow