Principle:Apache Airflow Scheduling Configuration
| Knowledge Sources | |
|---|---|
| Domains | Scheduling, Workflow_Orchestration |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
A framework for defining when and how frequently DAG runs are created based on configurable timetable strategies.
Description
Scheduling Configuration in Airflow is governed by the Timetable protocol, which decouples scheduling logic from the DAG definition. A timetable determines when the next DagRun should be created and what data interval it covers. Airflow provides built-in timetables for cron expressions, fixed intervals (timedelta), continuous execution, asset-triggered runs, and event-based scheduling. Custom timetables can be implemented by conforming to the Timetable protocol.
Usage
Use scheduling configuration when defining the cadence of DAG execution. Choose cron expressions for calendar-based schedules, timedelta for fixed intervals, asset triggers for event-driven pipelines, or custom timetables for complex business calendars (e.g., workday-only schedules).
Theoretical Basis
Timetable Protocol:
- next_dagrun_info(): Given the last data interval and scheduling restrictions, compute the next DagRunInfo
- Data Interval: A [start, end) time range representing the data period for each run
- run_after: The earliest time the scheduler should create the run
Scheduling Algorithm:
# Pseudo-code for scheduler timetable evaluation
def create_next_dagrun(dag, last_run):
restriction = DagRunRestriction(
earliest=dag.start_date,
latest=dag.end_date,
catchup=dag.catchup,
)
info = dag.timetable.next_dagrun_info(
last_automated_data_interval=last_run.data_interval,
restriction=restriction,
)
if info and now() >= info.run_after:
create_dagrun(info.data_interval, info.run_after)