本文介绍了我如何检查何时为特定的dag计划了下一次Airflow DAG运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经设置了气流,并计划将某些DAG安排为每天一次 0 0 * * *。
I have airflow set up and running with some DAGs scheduled for once a day "0 0 * * *".
我想检查下一次是什么时候
I want to check when is the next time a specific dag has been scheduled to run, but I can't see where I can do that within the admin.
推荐答案如果如果要使用 Airflow 的 CLI ,则有 next_execution 选项
If you want you use the Airflow's CLI, there's next_execution option
获取DAG的下一个执行日期时间。
Get the next execution datetime of a DAG. airflow next_execution [-h] [-sd SUBDIR] dag_id
UPDATE-1
如果您需要以编程方式进行操作(在气流任务内) ,您可以参考
If you need to do it programmatically (within an Airflow task), you can refer to
- next_e 函数 rel = nofollow noreferrer> cli.py
- (现在移至 dag_next_execution(..)
master )
- next_execution(..) function of cli.py
- (now moved to dag_next_execution(..) function of dag_command.py in master)
更多推荐
我如何检查何时为特定的dag计划了下一次Airflow DAG运行?
发布评论