Ad

AirFlow Scheduler - Run Date

- 1 answer

I have a DAG that runs weekly on every Monday at 11am. It ran on 13/05, it was turned off on 20/05 and was turned on again on 27/05.

dag = DAG(
    'my_dag',
    description='my_desc',
    default_args=args,
    schedule_interval='0 11 * * 1',
    max_active_runs=1,
    catchup=False)

My question is: on 27/05 DAG ran but "run date" was set to 20/05 and I don't know why. Is it because it was turned off on 20/05 and DAG got the "last scheduled date"? In this case, next week (June 3) it will run with "run date" set to 27/05 or 03/06?

What will be execution_date and next_execution_date in this case on June 3?

Task state

Thanks!

Ad

Answer

If you watch on all running tasks of current dag, you will see that at Run show datetime of previous running task defined in schedule_interval. Started and Ended show running real datetime of current task. In the next week (June 3) you will see in Run this date `2019-05-27T11:00:00'

Ad
source: stackoverflow.com
Ad