bpow
bpow

Reputation: 41

Airflow DAG isn't listening to @monthly schedule_interval

I'm trying to schedule a monthly DAG in Airflow. It is running on a daily basis even though dag.schedule_interval = '@monthly' (per instructions here http://airflow.readthedocs.org/en/latest/scheduler.html#dag-runs). I've also set dag_args['start_date'] = datetime(2016, 2, 1, 20, 0) and starts_at = time(13,0). Any thoughts why this might be happening?

Should I be using something like the following setup instead?

dag_args['start_date'] = datetime(2016, 2, 1, 0, 0)

dag_args['schedule_interval'] = '0 19 1 * *'

Upvotes: 0

Views: 2374

Answers (1)

Yu You
Yu You

Reputation: 388

First, your link to the "Dag Run" should be "https://pythonhosted.org/airflow/scheduler.html#dag-runs".

Second, you could test my "hello" gist at https://gist.github.com/yuyou/baa73df674d1dbcbc14d35b1fc293415

Use the "backfill" command to test the DAG:

airflow backfill hello -s 2016-01-01 -e 2016-04-01

And you should see there are 4 runs as expected.

Yu

Upvotes: 0

Related Questions