简体   繁体   English

Airflow DAG 即使使用硬编码日期时间也永远不会运行

[英]Airflow DAG even with hardcode datetime never runs

I have a problem with a DAG in Airflow, I've tried changing the start_date twice for a week before today and it still doesn't run.我在 Airflow 中遇到 DAG 问题,我已经尝试在今天之前的一周内两次更改 start_date,但它仍然无法运行。 The schedule interval is set to '5 9 * * *'.计划间隔设置为“5 9 * * *”。 Here is the code这是代码

from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta
//code
default_args = {
    'owner': 'Lucas',
    'email': ['//email'],
    'email_on_failure': True,
    'start_date': datetime(2021, 7, 9),
    'retry_delay': timedelta(minutes=5)
}

with DAG('instagram', default_args=default_args, schedule_interval='5 9 * * *', catchup=False) as dag:
    token = get_token()
    //code

It is really strange because it is not a problem with the dag itself, I can trigger the dag manually without any error and the start_date and schedule_interval seems fine, any ideas?这真的很奇怪,因为它不是 dag 本身的问题,我可以手动触发 dag 而不会出现任何错误,并且 start_date 和 schedule_interval 看起来很好,有什么想法吗?

The solution was to delete the dag and creating another one with a different name, same code.解决方案是删除 dag 并创建另一个名称不同、代码相同的 dag。 I still have no idea what problem in airflow caused this.我仍然不知道 airflow 中的什么问题导致了这个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM