dirtyw0lf
dirtyw0lf

Reputation: 1958

Manually starting DAG skips next scheduled run?

If a chron schedule exists for a given Airflow DAG to launch every month on the 1st at 6am like this: 0 6 * * 1 And the start date is March 1st 2020, then in theory the DAG will only launch April 1st 2020 to cover the entire period as per the documentation.

1) However, what if I wanted the DAG to launch on March 1st? Is there a way to set the DAG's start date to March 1st with an option to run as normal but to include the start date?

2) If I manually launch the DAG on April 3rd, will the DAG still automatically launch as per the chron schedule on May 1st, or skip it, seeing as how an execution took place within the period that May is supposed to cover?

Upvotes: 1

Views: 504

Answers (1)

SergiyKolesnikov
SergiyKolesnikov

Reputation: 7795

  1. Option 1: Trigger the DAG manually on March 1. Option 2: Set the start date to February 1, then the first interval will end on March 1 and the DAG will be triggered on schedule. I am not aware of any option that will let you run the DAG on the start date as you described.
  2. Manually triggering a run does not affect the run schedule, so the DAG will still run on May 1.

BTW: The schedule "0 6 * * 1" that you mentioned means "At 06:00 on Monday." "At 06:00 on the first day of a month" is "0 6 1 * *".

Upvotes: 3

Related Questions