Apache Airflow interview questions: scheduling and schedule intervals
Reviewed by Mark Dickie · Last updated
5 questions on this page you can answer and see marked on the spot. Go to the first one
Apache Airflow is a Python platform that runs workflows as DAGs, and its scheduler decides when each DAG run starts. Interviewers ask about scheduling to see whether you can predict when a DAG fires, not just write one. Most wrong answers come from mixing up the logical date with the moment a run actually starts, or from forgetting that catchup backfills every missed interval.
Which schedule settings come up in an Airflow interview?
| Setting | What to know | Common mistake |
|---|---|---|
schedule | Replaced schedule_interval in Airflow 2.4; takes a preset, a cron string, a timedelta, or a timetable object | Still writing schedule_interval in new DAGs |
@daily preset | Runs at midnight UTC by default | Assuming midnight in your local timezone |
| Logical date | Start of the data interval; the run fires at the end of that interval | Reading it as the time the run started |
catchup | When True, the scheduler creates a run for every interval between start_date and now | Leaving it on with an old start_date and getting hundreds of runs at unpause |
start_date | Anchors the first data interval | Using datetime.now(), which moves start_date on every parse so the first interval never arrives |
schedule=None | No automatic runs; only manual or API triggers | Expecting the DAG to run on its own after unpausing |
Practice these on a local Airflow instance before the interview:
- Write a DAG with
schedule="0 6 * * 1-5"and work out which logical date the first run carries. - Set
start_datethree months back withcatchup=True, unpause the DAG, and count the runs the scheduler creates. - Replace
schedule=timedelta(hours=6)with a cron string and explain why the two versions run at different times of day.
Key facts
- Tarmac has 14 Apache Airflow interview questions on this topic, 10 of them on this page, at difficulty 1–5 of 5.
- Tarmac tracked 247 job postings asking for Apache Airflow in November 2026.
- Roles asking for Apache Airflow advertise a median base salary of £81,750, across 78 job postings as of November 2026.
- Tarmac last reviewed these Apache Airflow interview questions on 26 October 2026.
At a glance
| Questions | 10 shown · 14 in the bank |
|---|---|
| Difficulty | 1–5 of 5 |
| Formats | Multiple choice, Ordering, Multiple answer, Code output, True / false, Find the bug, Short answer, Fill in the blank, Coding exercise |
| Interactive | 1 run your code against tests, in the app |
What you'll review
- schedule interval
Practice questions
Try one before you open the answer. Pick an option and press Check; it's marked on the spot.
In Apache Airflow 2.x, a DAG is defined with schedule="@daily". Which cron expression does this preset correspond to?#
Options
Show answer
Airflow's @daily schedule preset equals the cron expression 0 0 * * *, meaning one run per day at midnight in the DAG's timezone (UTC by default). Airflow's other presets follow the same pattern: @hourly is 0 * * * *, @weekly is 0 0 * * 0, and @monthly is 0 0 1 * *.
Airflow's @daily preset is shorthand for the cron expression 0 0 * * *, so the DAG runs once a day at midnight in the DAG's timezone (UTC by default). 0 * * * * is the @hourly preset, 0 0 * * 0 is @weekly, and 0 0 1 * * is @monthly.
In Apache Airflow (2.x), you can set a DAG's schedule (formerly schedule_interval) using cron presets. Order these presets from the MOST frequent run cadence to the LEAST frequent.#
Put these in order
Show answer
Ordered from most to least frequent, Airflow's cron presets are @hourly, @daily, @weekly, @monthly, @yearly. Each preset stands for a fixed cron expression. For example, @hourly is 0 * * * * and @yearly is 0 0 1 1 *. Each preset in the list runs over a longer period than the one before it, so DAGs that use the later presets run less often.
Each Airflow preset maps to a fixed cron expression: @hourly is 0 * * * * (every hour), @daily is 0 0 * * * (midnight every day), @weekly is 0 0 * * 0 (midnight every Sunday), @monthly is 0 0 1 * * (midnight on the first of each month), and @yearly is 0 0 1 1 * (midnight on January 1). An hour is shorter than a day, a day is shorter than a week, a week is shorter than a month, and a month is shorter than a year, so the order from most to least frequent is hourly, daily, weekly, monthly, yearly.
In Apache Airflow 2.x, a DAG is defined with start_date=datetime(2024, 1, 1), schedule="@daily", and catchup=False. Which of the following statements are true? (Select all that apply.)#
Options
Pick every one that applies.
Show answer
An Airflow @daily DAG (cron 0 0 * * *) runs at the end of each data interval. The run for 2024-01-01 therefore fires at about 2024-01-02 00:00, not at start_date. Setting schedule=None turns automatic scheduling off, so the DAG runs only when triggered. With catchup=False, Airflow does not backfill missed intervals and schedules only the latest one.
Airflow schedules a run when its data interval ends, not when it starts. So the interval that begins at 2024-01-01 runs at about 2024-01-02 00:00, which is also why the first run does not happen at start_date itself. The preset @daily is shorthand for 0 0 * * *, and schedule=None turns automatic scheduling off, so the DAG runs only when triggered. The claim about one run per day since January describes catchup=True. With catchup=False, the scheduler creates only the latest data interval and skips the missed ones.
In Airflow 2.x (2.4+), this DAG is unpaused for the first time at exactly 2024-03-10 14:30 UTC and has no previous runs. The first DAG run's task prints its data_interval_start. What is printed? (Assume {{ data_interval_start }} renders in ISO format.)#
from datetime import datetime, timezone
from airflow import DAG
from airflow.operators.bash import BashOperator
with DAG(
dag_id="hourly_job",
start_date=datetime(2024, 1, 1, tzinfo=timezone.utc),
schedule="@hourly",
catchup=False,
) as dag:
BashOperator(
task_id="show",
bash_command="echo {{ data_interval_start }}",
)Show answer
2024-03-10T13:00:00+00:00
With a cron preset like @hourly, Airflow schedules a run at the end of each data interval. Because catchup=False, it skips all the missed intervals since start_date and creates a run only for the most recent completed interval. At 14:30 that interval is 13:00–14:00, so data_interval_start (the same as the logical date) is 2024-03-10T13:00:00+00:00. The 14:00–15:00 interval has not finished yet, so it is not scheduled until 15:00.
In Apache Airflow 2.x (2.4+), a DAG has start_date=datetime(2024, 1, 1, 6, 0) (UTC), schedule=timedelta(hours=12) and catchup=True. The default timetables are in use. What is the logical date (data_interval_start) of the run with the second-earliest logical date?#
Options
Show answer
With schedule=timedelta(hours=12) and a start_date of 2024-01-01 06:00 UTC, the second run's logical date is 2024-01-01 18:00 UTC. A timedelta schedule uses DeltaDataIntervalTimetable, which starts intervals at start_date and steps by the delta with no clock alignment. That gives logical dates of 06:00, then 18:00, and so on. A cron schedule would line runs up with midnight or noon instead.
When schedule is a timedelta, Airflow uses DeltaDataIntervalTimetable. Its intervals start at start_date and step by the delta, with no alignment to clock boundaries. The first interval is 06:00–18:00 on Jan 1, so the first run has logical date 06:00. The second interval starts at 18:00 on Jan 1, so the second run's logical date is 2024-01-01 18:00. The 12:00 and 00:00 answers come from assuming cron-style alignment to midnight or noon, which only happens with a cron schedule such as 0 */12 * * *. The 2024-01-02 06:00 answer is wrong because it treats the delta as 24 hours.
In Apache Airflow 2.x, take a DAG with schedule="@daily", start_date=datetime(2024, 1, 1) and catchup=False, using the default timetable. The DAG run whose data interval covers 2024-01-01 00:00 to 2024-01-02 00:00 is triggered by the scheduler at about 2024-01-02 00:00, after that interval ends, not at 2024-01-01 00:00.#
Options
Show answer
In Airflow 2.x, a daily DAG run for the data interval 2024-01-01 to 2024-01-02 is triggered around 2024-01-02 00:00. The default timetable runs a DAG at the end of its data interval, even though the run's logical date is the start of that interval. Setting catchup=False does not change this timing. It only stops older missed intervals from being backfilled.
Airflow's default cron-based timetable runs a DAG only after its data interval has finished. The run with logical date (execution_date) 2024-01-01 covers the period from 2024-01-01 to 2024-01-02, so the scheduler creates it once that period closes, around 2024-01-02 00:00. Setting catchup=False only stops backfilling of older missed intervals. It does not change the rule that a run fires at the end of its interval. People are often confused because the run is labelled with the start of the interval but actually executes at its end.
This Airflow 2.x DAG should run once at 09:00 (UTC) every weekday, Monday through Friday. Instead it runs shortly after midnight. Which line contains the bug?#
from datetime import datetime
from airflow import DAG
from airflow.operators.empty import EmptyOperator
with DAG(
dag_id="weekday_report",
start_date=datetime(2024, 1, 1),
schedule="9 0 * * 1-5",
catchup=False,
) as dag:
EmptyOperator(task_id="build_report")Show answer
The bug is on line 8.
Airflow reads schedule as a standard 5-field cron expression in this order: minute, hour, day-of-month, month, day-of-week. "9 0 * * 1-5" therefore means minute 9 of hour 0, so the DAG fires at 00:09 on weekdays. The minute and hour fields are swapped. The correct expression is "0 9 * * 1-5". The day-of-week range 1-5 (Monday to Friday) is already correct. Note that a run's logical date marks the start of its data interval, and the run actually fires when that interval ends. That detail doesn't change which wall-clock times the cron expression matches.
In Apache Airflow 2.x, a DAG has start_date=datetime(2024, 1, 1), schedule="@daily" (the default cron-based timetable), and catchup=False. It is deployed and unpaused at 2024-01-10 15:00 UTC. What is the logical_date (execution_date) of the first DAG run the scheduler creates, and roughly when does that run actually start? Explain why the logical date differs from the actual start time.#
Show answer
The first run has logical_date 2024-01-09 00:00 UTC, and it starts almost at once (about 2024-01-10 15:00). Airflow schedules by data intervals. A run with logical date X covers the interval [X, X + 1 day) and is only triggered once that interval has ended. Because catchup=False, the scheduler skips the older intervals and creates a run only for the most recent interval that has already finished, which is [2024-01-09, 2024-01-10). That interval ended at 2024-01-10 00:00, so the run is due right away. The logical date is the start of the data interval (data_interval_start), not the time the run actually ran. The next run, with logical date 2024-01-10, starts around 2024-01-11 00:00.
Under cron timetables, Airflow triggers a run when its data interval ends. The logical date is set to the start of that interval. With catchup=False, the scheduler creates only the latest interval that has already finished. At 2024-01-10 15:00 that is [01-09, 01-10), so the run gets logical_date 2024-01-09 and starts immediately. A common mistake is to expect 2024-01-10, but that interval has not closed yet.
In Apache Airflow 2.x, the scheduler turns a DAG's schedule argument into a timetable object. Assume the default [scheduler] create_cron_data_intervals = True. Passing a datetime.timedelta (e.g. schedule=timedelta(hours=6)) creates a _____, whose intervals are anchored to start_date rather than wall-clock boundaries. Passing a cron string (e.g. schedule="0 */6 * * *") creates a _____. Passing the preset "@once" creates a _____. Give the class names.#
Show answer
In Apache Airflow 2.x, the scheduler turns a DAG's schedule argument into a timetable object. Assume the default [scheduler] create_cron_data_intervals = True. Passing a datetime.timedelta (e.g. schedule=timedelta(hours=6)) creates a DeltaDataIntervalTimetable, whose intervals are anchored to start_date rather than wall-clock boundaries. Passing a cron string (e.g. schedule="0 */6 * * *") creates a CronDataIntervalTimetable. Passing the preset "@once" creates a OnceTimetable. Give the class names.
Airflow 2.x converts legacy schedule_interval values with create_timetable. A timedelta becomes a DeltaDataIntervalTimetable. Each run's data interval runs from the previous point plus the delta, counted from start_date, so a 06:30 start_date gives runs at 06:30, 12:30 and so on. A cron string becomes a CronDataIntervalTimetable while create_cron_data_intervals is True. Its intervals line up with cron ticks, and each run fires at the end of its interval. If that setting is False, Airflow uses CronTriggerTimetable instead. The preset "@once" maps to OnceTimetable, which schedules a single run.
In Apache Airflow 2.x, a DAG with schedule=timedelta(minutes=N) uses DeltaDataIntervalTimetable. With catchup=True, the scheduler creates one run per data interval:#
Starter code
from datetime import datetime, timedelta
def catchup_runs(start, delta_minutes, now, end=None):
# TODO: generate logical dates of completed data intervals
return []
Your solution must pass
- hourly partial
- exact boundary
This one is written and run, not read. Solve it in the app and your code is executed against these tests and the hidden ones.
Related interview questions
Job market
See apache-airflow salaries and hiring demand from live job postings.
The other 4 questions
This page shows 10 and marks what you pick. That's as far as a page can go. A free account opens the other 4 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.
Free · the whole bank · 100 answers per 30 days, each marked with written feedback