How to work correctly airflow schedule_interval

前端 未结 5 974
迷失自我
迷失自我 2021-01-04 13:00

I want to try to use Airflow instead of Cron. But schedule_interval doesn\'t work as I expected.

I wrote the python code like below.
And in my understanding, Air

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-04 13:30

    With the example you've given @daily will run your job after it passes midnight. You might try changing it either to timedelta(days=1) which is relative to your fixed start_date that includes 08:15. Or you could use a cron spec for the schedule_interval='15 08 * * *' in which case any start date prior to 8:15 on the day BEFORE the day you wanted the first run would work.

    Note that depends_on_past: False is already the default, and you may have confused its behavior with catchup=false in the DAG parameters, which would avoid making past runs for time between the start date and now where the DAG schedule interval would have run.

提交回复
热议问题