[英]How to make an airflow dag skip an hour if previous trigger is still in motion
A simple question for airflow DAG development气流DAG开发的一个简单问题
args = {
'owner': 'Airflow',
'start_date': dates.days_ago(1),
'email': ['email1@gmail.com', 'email2@gmail.com'],
'email_on_failure': True,
'email_on_success': True,
'schedule_interval': '0 * * * *',
}
The above configuration states that the DAG should run every hour on the top of the hour.上面的配置表明 DAG 应该在每小时的最开始运行一次。
How do I make the job skip one hour if the previous job is still in motion?如果之前的工作仍在进行中,如何让工作跳过一小时?
Thanks!谢谢!
As mentioned in comment you can achieve what you want by setting max_active_runs=1
.如评论中所述,您可以通过设置max_active_runs=1
来实现您想要的。 However, this will depend on wider context of expected behaviour.然而,这将取决于预期行为的更广泛背景。
If you need more complex schedule consider implementing your own Timetable .如果您需要更复杂的时间表,请考虑实施您自己的时间表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.