1

I created DAG with schedule_interval equals: "0 0 * * *".

I know that airflow shows time in UTC format, but I see next run date in past and my DAGs didn`t run.

Please help)

I write this post at 15.03.2022 in 9.30. enter image description here DAG`s code:

from datetime import datetime, timedelta
from airflow import DAG

from airflow.operators.bash import BashOperator

default_args = {
    'owner': 'admin',
    # 'depends_on_past': False,
    # 'email': ['VALID_EMAIL_ID'],
    # 'email_on_failure': True,
    # 'email_on_success': True,
    # 'retries':1,

}

with DAG(
    'ODS_AXDB',
    # These args will get passed on to each operator
    # You can override them on a per-task basis during operator initialization
    default_args=default_args,
    description='A simple tutorial DAG',
    schedule_interval="00 00 * * *",
    start_date=datetime(2021, 1, 1),
    catchup=False,
    tags=['example'],
) as dag:

    t1 = BashOperator(
        task_id='ods_axdb',
        bash_command="/usr/local/jobs/ODS_AXDB/ODS_AXDB/ODS_AXDB_run.sh ",
        dag=dag)
  • I read that all dates in Airflow are tied to the data interval concept in some way. What if I want to simply start DAGs in exactly time? – Макар Погорелов Mar 15 '22 at 07:35
  • Not answering your question, but you can change your schedule to '@daily'. And you don't need the line dag=dag in your operator because you are assiging the dag with the context (with DAG...) – Javier Lopez Tomas Mar 15 '22 at 17:00

0 Answers0