气流cron表达式未正确调度dag

编程入门 行业动态 更新时间:2024-10-11 21:28:25
本文介绍了气流cron表达式未正确调度dag的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在探索将Airflow用作cron,以便在设置cron时可以使用其其他功能。

I am exploring Airflow to be used as a cron so that I could use its other features while setting up the cron.

我正在通过设置cron来测试其功能。例如 2,3,5,8,* * * * 。我期望特定的dag计划在每小时的第2、3、5和8分钟进行。但是实际上,第2分钟的dag是在3日执行的,在5日是3日,在8日是5日。而且它根本不执行第八次。我猜想它将在下一个小时的第二分钟的第8分钟执行。

I was testing its functionality by setting cron like "2,3,5,8, * * * *". I was expecting particular dag to be scheduled on minute 2,3,5 and 8 of every hour. However in reality the dag for 2nd minute is executed on 3rd, for 3rd on 5th and for 5th on 8th. And it is not executed for 8th at all. I guess it would be executed for 8th on 2nd minute of the next hour.

看起来像某种错误或气流中cron表达的情况未处理。

Looks like some kind of a bug or not handled case for cron expression in airflow.

推荐答案

是的,这是因为气流不是在间隔上执行,而是在间隔完成后执行。由于您指定了2、3、5、8分钟,因此它将在这些时间间隔的3、5、8和2结束时运行。这在文档此处

Yeah, that's because airflow doesn't execute on the interval, but rather after that interval has finished. Since you specify minutes 2, 3, 5, 8 then it will run at the end of those intervals, on 3, 5, 8, and 2. That's explained in the docs here

更多推荐

气流cron表达式未正确调度dag

本文发布于:2023-11-23 19:20:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622592.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表达式   气流   正确   dag   cron

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!