我想向DAG添加时间表(每个星期五的上午8:00)。下面是DAG的配置:
DAG CONFIG:
args = {
'owner': 'airflow',
'start_date': airflow.utils.dates.days_ago(20),
'depends_on_past': False,
'email': [failure_email],
'email_on_failure': True,
'email_on_retry': True,
}
dag = DAG(dag_id='dag_airflow_delete_logs_less_than_40_days',
default_args=args,
schedule_interval='0 8 * * 5',
max_active_runs=1)
在将时间表添加到DAG之后,UTC星期五上午8:00的气流没有消失。我从crontab计划中删除了“ 5”,并将其配置为“ 0 8 * * *”,它每天都能正常工作。
我还尝试了使用crontab格式安排时间间隔的其他方法,但还是没有运气:
(0 8 * * 5)
(0 8 * * FRI)
当我指定间隔中的日期时,我不明白为什么它不起作用?请让我知道你的想法。预先感谢!
注意:我使用以下网站来检查crontab配置。
1)https://crontab.guru/
2)http://corntab.com
DAG运行的附加屏幕截图:http://tinypic.com/view.php?pic=5x4x3d&s=9#.W-RSjLpFyFQ