Search code examples
pythonairflowairflow-scheduler

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. The schedule interval is set to '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?


Solution

  • The solution was to delete the dag and creating another one with a different name, same code. I still have no idea what problem in airflow caused this.