2
votes

I have an Airflow dag that I need to schedule at the same time whether it is standard or daylight savings time, but the airflow server and cron scheduling is based on utc. It needs to run after a database restore occurs and that server runs the restore based on the local time.

This is causing me to have to schedule it an hour later during daylight savings time. Is there a way to have airflow run the job at the same hour whether it is daylight savings time or standard time?

For example, the database restore completes at noon and 8PM daily. This time is the same whether it is PDT or PST. Any way to do this in cron so that the time the job runs is always at noon and 8pm?

1
Unfortunately, the configuration is managed at a higher level than just my job and I am unable to change the timezone for the entire team's server. I need this solution to only apply to my jobs. - DebbieS

1 Answers

0
votes

You can set the timezone in Airflow configuration, in airflow.cfg, to any IANA timezone. The default is utc.

The UI instead only runs in UTC.

More info on timezones in Airflow at https://airflow.apache.org/timezone.html