Skip to content Skip to sidebar Skip to footer

Airflow Cron Expression Is Not Scheduling Dag Properly

I am exploring Airflow to be used as a cron so that I could use its other features while setting up the cron. I was testing its functionality by setting cron like '2,3,5,8, * * * *

Solution 1:

This is not a bug. I agree it feels weird but this is explained here: https://pythonhosted.org/airflow/scheduler.html

Note that if you run a DAG on a schedule_interval of one day, the run stamped 2016-01-01 will be trigger soon after 2016-01-01T23:59. In other words, the job instance is started once the period it covers has ended.

Solution 2:

Yeah, that's because airflow doesn't execute on the interval, but rather after that interval has finished. Since you specify minutes 2, 3, 5, 8 then it will run at the end of those intervals, on 3, 5, 8, and 2. That's explained in the docs here

Post a Comment for "Airflow Cron Expression Is Not Scheduling Dag Properly"