How can I schedule a dag to have a weekday execution date but have a start date the following day, which is not necessarily a weekday?
My rational is that I get data at the end of each business day which I would like to process early the next morning. The airflow common pitfalls describes the execution date as the date the data belongs to while the start date is the date you run your ETL.
For example: I want a series of dag runs to have the following execution and start dates -
DAG start_date Task Started Task execution_date
2018-01-01 2018-01-02 Tues 2018-01-01 Mon
2018-01-03 Wed 2018-01-02 Tues
2018-01-04 Thur 2018-01-03 Wed
2018-01-05 Fri 2018-01-04 Thur
2018-01-06 Sat 2018-01-05 Fri
2018-01-06 Tues 2018-01-08 Mon
The closest I have managed to get to this is by using the schedule: 0 2 * * TUE-SAT which has the wrong execution date (Saturday) on when started on a Tuesday (see below)
DAG start_date Task Started Task execution_date
2018-01-01 2018-01-03 Wed 2018-01-02 Tues
2018-01-04 Thur 2018-01-03 Wed
2018-01-05 Fri 2018-01-04 Thur
2018-01-06 Sat 2018-01-05 Fri
2018-01-09 Tues 2018-01-06 Sat
or the schedule: 0 2 * * MON-FRI which does not run Fridays DAG till Monday and I need the results over the weekend.
DAG start_date Task Started Task execution_date
2018-01-01 2018-01-02 Tues 2018-01-01 Mon
2018-01-03 Wed 2018-01-02 Tues
2018-01-04 Thur 2018-01-03 Wed
2018-01-05 Fri 2018-01-04 Thur
2018-01-08 Mon 2018-01-05 Fri
2018-01-06 Tues 2018-01-08 Mon