collarblind
collarblind

Reputation: 4739

Python 3 Airflow scheduled job does not run

I set up my job to run everyday at 9:00 UTC.

I have the following arguments for my DAG:

start_date= datetime(2018, 8, 15)
schedule_interval='0 9 * * *'

I deployed the job on 2018-08-16 around 17:00 UTC. I was expecting it to run on 2018-08-17 9:00 UTC but it did not. Any reason why?

Upvotes: 0

Views: 161

Answers (1)

Charlie Gelman
Charlie Gelman

Reputation: 436

There's a conflict between your start time and the scheduler interval. The start date says run starting at midnight (since there's no hour), while the cron job says run at 9am. Since you want this to run daily anyway - set scheduler_interval to '@daily' and put the 9 in your start_date.

For example:

start_date= datetime(2018, 8, 15, 9)
schedule_interval='@daily'

If you already have history for this I'd suggest clearing the history so that doesn't override your start date.

Upvotes: 2

Related Questions