Scheduling, Catchup, Retries, SLAs & Alerting in Airflow
Configure schedules, catchup, retries, SLAs, and alerts so missed runs are visible.
In plain words
Cron/data schedule and stable timezone. Next, catchup, max active runs, and resource pools. Finally, logical freshness and owner escalation.
Think of it like…
Scheduling is the timetable, catchup is the special list of missed trains, retry is sending the same train after track clearance, and SLA is the passenger-facing arrival promise.
Where you’ve seen it
schedule='0 2 * * *', start_date=pendulum.datetime(..., tz='UTC'), catchup=False, retries=3, retry_delay=..., max_active_runs=1; an SLA callback pages only if the daily model misses its 04:00 freshness target.
Words you’ll hear
- Schedule
- The recurring calendar/event rule that creates Airflow logical data intervals, separate from actual start time.
- Retries
- A setting that materializes all eligible historical runs from
start_date, useful only with an explicit capacity plan. - SLAs
- A completion/deadline expectation for task or data freshness that can trigger a callback before a failure becomes visible to consumers.
- Operational boundary
- A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning. Use a named timezone/UTC, set
start_dateandcatchupdeliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.
Visual diagram
Theory & deep dive
Schedule: the working mechanism
Airflow schedules DAG runs by logical intervals, catchup creates missed historical runs, retries handle transient task failures, and SLAs/alerts detect tasks that are late rather than merely failed.
Cron/data schedule and stable timezone. Catchup, max active runs, and resource pools, then retries, backoff, callbacks, and timeout; this exposes the state governed by SLAs.
schedule='0 2 * * *', start_date=pendulum.datetime(..., tz='UTC'), catchup=False, retries=3, retry_delay=..., max_active_runs=1; an SLA callback pages only if the daily model misses its 04:00 freshness target.
Scheduling, Catchup, Retries, SLAs & Alerting in Airflow: failure mode and production response
A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
Use a named timezone/UTC, set start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows. Track Active runs as "cap parallel historical partitions", and make Retry delay visible to the dataset owner.
start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.How it works, step by step
Step 1 of 41. Define interval
Cron/data schedule and stable timezone. Airflow schedules DAG runs by logical intervals, catchup creates missed historical runs, retries handle transient task failures, and SLAs/alerts detect tasks that are late rather than merely failed.
- Active runs
- cap parallel historical partitions
- Retries
- A setting that materializes all eligible historical runs from `start_date`, useful only with an explicit capacity plan.
When to use it & trade-offs
What it is
Airflow schedules DAG runs by logical intervals, catchup creates missed historical runs, retries handle transient task failures, and SLAs/alerts detect tasks that are late rather than merely failed. schedule='0 2 * * *', start_date=pendulum.datetime(..., tz='UTC'), catchup=False, retries=3, retry_delay=..., max_active_runs=1; an SLA callback pages only if the daily model misses its 04:00 freshness target.
Why it matters: A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning. Use a named timezone/UTC, set start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.
When to reach for it
- Configure schedules, catchup, retries, SLAs, and alerts so missed runs are visible.
- Choose Schedule because it provides this capability: The recurring calendar/event rule that creates Airflow logical data intervals, separate from actual start time.
- Keep evidence for Active runs at "cap parallel historical partitions" so the last production stage-SLA/alert - logical freshness and owner escalation-remains testable.
When to avoid or be careful
- A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
- Do not conflate Retries with Schedule. The second concept contributes different behavior: A setting that materializes all eligible historical runs from
start_date, useful only with an explicit capacity plan. - Release only after this guardrail is in place: Use a named timezone/UTC, set
start_dateandcatchupdeliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.
Schedule / Retries / SLAs - roles, limits, and operating cost
Strengths: The recurring calendar/event rule that creates Airflow logical data intervals, separate from actual start time. Airflow schedules DAG runs by logical intervals, catchup creates missed historical runs, retries handle transient task failures, and SLAs/alerts detect tasks that are late rather than merely failed.
Watch out: A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
start_date, useful only with an explicit capacity plan.Strengths: A setting that materializes all eligible historical runs from start_date, useful only with an explicit capacity plan. In this workflow it supports: Failure policy - retries, backoff, callbacks, and timeout.
Watch out: The operating cost is real: backoff should outlast a transient dependency.
Strengths: A completion/deadline expectation for task or data freshness that can trigger a callback before a failure becomes visible to consumers. Its output can be checked with SLA clock.
Watch out: Operating guardrail: Use a named timezone/UTC, set start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for Schedule, and how would Active runs reveal it?”
- “Why is Retries distinct from this behavior: a completion/deadline expectation for task or data freshness that can trigger a callback before a failure becomes visible to consumers?”
- Production clue: A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
- Design probe: Use a named timezone/UTC, set start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.
Benchmarks & rules of thumb
- Active runs
- cap parallel historical partitions
- Retry delay
- backoff should outlast a transient dependency
- SLA clock
- deadline relative to logical interval and consumer need
Common mistakes & follow-ups
Common interview mistakes
- A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
- Reporting success from a job exit code without checking Active runs and Retry delay.
- Treating this example as complete without replay, rollback, or access boundaries:
schedule='0 2 * * *', start_date=pendulum.datetime(..., tz='UTC'), catchup=False, retries=3, retry_delay=..., max_active_runs=1; an SLA callback pages only if the daily model misses its 04:00 freshness target.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: The recurring calendar/event rule that creates Airflow logical data intervals, separate from actual start time.
- What does the recovery plan do when this occurs? A cron expressed in a local timezone shifts across DST, catchup floods a new DAG, and retrying a task immediately during a provider outage amplifies load while dashboards see no scheduled-run warning.
- When is Schedule insufficient for Retry delay, and what does adding Retries cost in Active runs?
start_date and catchup deliberately, configure exponential backoff/retry budgets, and alert on failed/late logical partitions using data consumers' SLO windows.Knowledge check
Put it into practice
Practice related interview Q&A
Apply Scheduling, Catchup, Retries, SLAs & Alerting in Airflow with data engineer interview Q&A and hands-on practice.