CronNudge

Published October 21, 2026

How to Monitor Airflow Dag Schedules

An Apache Airflow schedule creates a Dag run, then runs the tasks in it. The UI lists runs that were created. A scheduler that is not running, a paused Dag, or a file the Dag processor never loads leaves no run. Nothing in that list is missing, and nothing emails you. A ping after the work is the alert for that silence.

The schedule facts below are from the Apache Airflow docs. A Linux crontab on a machine you run is crontab not running. The closest scheduler siblings are Celery beat, Prefect flow schedules, and Dagster schedules and sensors. The five fields are in cron expression examples. The general pattern is how to monitor cron jobs.

The scheduler has to be running

The scheduler is a persistent service. You start it with airflow scheduler. Dags start executing once that process is running successfully. It uses the configured executor to run tasks that are ready. Once a minute, by default, it collects Dag parsing results and checks whether any active tasks can be triggered. A tick can wait for that loop.

Running more than one scheduler is supported, added in Airflow 2.0, for throughput and so a dead scheduler is not a single point of failure. When a SchedulerJob is judged dead, another scheduler adopts the running or queued tasks that the dead process had launched. Adoption does not create the next scheduled run. If every scheduler is stopped, nothing new is scheduled.

[scheduler] use_job_schedule set to False is the maintenance switch: the process can be up and still create no new Dag runs unless something triggers them from outside.

A paused Dag does not schedule

[core] dags_are_paused_at_creation defaults to True. A Dag is paused when it is first stored. A paused Dag does not schedule task instances. You can still trigger a manual run. Tasks that were already running are allowed to finish. Downstream tasks stay in scheduled until you unpause.

Unpause the Dag in the UI or the API before you expect a cron tick. A manual run can ping. The schedule itself will not, until the Dag is unpaused.

Draining is the other stop. It blocks new scheduled and asset-triggered runs, lets queued or running runs finish their tasks, and then the scheduler pauses the Dag. You can still trigger a run while it drains.

Consecutive failures can pause a Dag too. [core] max_consecutive_failed_dag_runs_per_dag defaults to 0, which means never. The Dag argument max_consecutive_failed_dag_runs overrides it. The feature is marked experimental. If you set a number and the Dag hits it, the Dag pauses, and the next tick does not schedule.

When a cron tick becomes a run

The argument is schedule. Airflow 3.0 removed schedule_interval. Pass a cron string, a datetime.timedelta, a preset, or a timetable. The FAQ still says that omitting it defaults to one day, datetime.timedelta(1), and that the value belongs on the Dag. Task default_args do not override the Dag's schedule.

Presets the docs map to five fields:

Preset Meaning Cron
@hourly Start of the hour 0 * * * *
@daily Midnight 0 0 * * *
@weekly Midnight Sunday 0 0 * * 0
@monthly Midnight on the 1st 0 0 1 * *
@quarterly Midnight on the 1st, every 3rd month 0 0 1 */3 *
@yearly Midnight on 1 January 0 0 1 1 *

None means the Dag is only triggered from outside. @once runs once. @continuous runs when the previous run finishes. The check parser rejects @once and @continuous. It does accept @hourly, @daily, @weekly, @monthly, and @yearly as the five-field schedules in the table. Prefer the five fields. That is the expression the preset table lists.

Airflow parses cron with croniter, which also accepts an extended form such as 0 0 * * MON#1. Copy a five-field expression the check accepts. Read it on the cron tool before you save it.

start_date is the earliest trigger time the scheduler will create, not the moment the tasks start. A naive start_date is read in [core] default_timezone, which is utc on a fresh install. Prefer an aware pendulum datetime. The docs say not to use the standard-library timezone objects. They also say to prefer UTC when you can.

What "the run starts at the tick" means depends on the timetable, and Airflow 2 and Airflow 3 default differently.

A bare cron string in Airflow 3 uses CronTriggerTimetable. [scheduler] create_cron_data_intervals defaults to False. On that timetable, data_interval_start and data_interval_end are the same instant, the cron tick, and the run is created to execute then. logical_date is data_interval_start, so it is the tick too. Airflow called this execution_date before 2.2.

Airflow 2.x defaults create_cron_data_intervals to True, which selects CronDataIntervalTimetable. You get the same timetable in Airflow 3 if you set the flag True, or if you pass CronDataIntervalTimetable yourself. The run is scheduled when the interval ends. logical_date is the start of that window, and the timestamp in run_id is run_after, one period later. The scheduler page still describes this shape: a cron or timedelta schedule does not trigger tasks until the period it covers has ended, and a @daily Dag looks a day late in the UI because the run for a day starts after that day. The FAQ says a task is not triggered until the first schedule interval after start_date has passed. That is the data-interval reading.

For a regular cron such as 0 0 * * *, both timetables make the run eligible at a midnight boundary. The clock you copy onto the check is that cron. What changes is which window logical_date names. Do not add a day to the check to "match logical date." The ping happens after the tasks finish, which is after run_after.

A timedelta is not the same clock. Airflow 3 defaults it to DeltaTriggerTimetable. With catchup=False, the first run lands at pickup time, because a delta has no wall-clock tick to snap to. [scheduler] create_delta_data_intervals is documented as the switch for timedelta schedules, and it defaults to False, but the timetable page says it is not currently consulted. Timedelta schedules follow create_cron_data_intervals. Setting only create_delta_data_intervals=True still leaves DeltaTriggerTimetable. Pass DeltaDataIntervalTimetable yourself, or turn on create_cron_data_intervals, when you want a contiguous window. On that timetable the first run with catchup=False covers one interval ending at pickup.

Switching a Dag that already has runs from the trigger timetable to the data-interval timetable skips one scheduled run, so the next logical_date does not collide with the previous one. The other direction does not skip. Flipping the flag, or crossing the Airflow 2 to Airflow 3 default, is that switch. Pin the timetable, or pin the flag, before you upgrade if the tasks read data_interval_start or ds.

Without a start_date, which is optional when catchup=False, a trigger timetable with the default run_immediately=False waits for the next future tick. It does not fire for a tick that already passed.

Catchup, queues, and a run that exists but has not pinged

catchup defaults to False ([scheduler] catchup_by_default). Missed times between start_date and now are not backfilled when the Dag is activated or unpaused. The timetable picks the most recent applicable time.

On CronTriggerTimetable that is the latest cron tick that is not after now and not before start_date. The docs' example: enable the Dag at 15:00 on 31 January, schedule @daily or 0 0 * * *, catchup=False. The scheduler immediately creates a run for midnight on 31 January, because that tick is already in the past. The next tick, midnight on 1 February, waits until that time. Pause at 15:00 on 31 January and unpause at 15:00 on 2 February, and the midnight on 1 February is skipped. A run for midnight on 2 February is created immediately.

On a data-interval timetable the same unpause creates a run for the most recently completed interval, not for the tick that is still open.

catchup=True creates a Dag run for each missed scheduled time since the last automated run, or since start_date if there is none. Those runs may execute together up to max_active_runs, which defaults from [core] max_active_runs_per_dag. That default is 16. The scheduler will not create more Dag runs once the Dag is at the limit. Catchup also runs when you pause a Dag and later unpause it, if catchup is on.

max_active_tasks is how many task instances of the Dag may be running. Past that, the FAQ says tasks are queued. The default of [core] max_active_tasks_per_dag is 16. The scheduler also looks at free pool slots and schedules at most that many task instances in one iteration. A task sitting queued has not run the ping step.

A task with execution_timeout set fails with AirflowTaskTimeout when it exceeds that timedelta. A task with no timeout can stay running. If the worker dies and the task instance is left running, Airflow looks for that periodically, then fails the task or retries it when retries remain. That is a failed task. It is not the same as a scheduler that never created a run.

A file that does not load

The Dag processor executes each Python file and loads the Dag objects it finds. airflow dags list is the check that the Dag was found. airflow dags list-import-errors lists files that failed to import.

Files that do not contain airflow and dag are ignored. The Dags page says that search is case-insensitive. An ignored file is not a Dag.

If parsing takes longer than dagbag_import_timeout, the FAQ says files may not be processed completely and Dags can disappear from the UI. The timeout defaults to 30 seconds. [scheduler] dag_version_inflation_check_level set to error treats the inflation findings as import errors and prevents the Dag from loading. The default of that setting is warning, which loads the Dag and shows a warning.

A bundle whose only file fails to import has no registered Dag. A Dag that was not loaded is not scheduled. There is no run, no callback, and no ping.

Removing the file deactivates the Dag. The processor sets that when it no longer sees a Dag it had stored. Deactivated Dags are not the Active list. History is kept. Putting the file back activates it again.

Timezone

Datetimes are stored in UTC. The UI defaults to UTC, and a browser can switch the display zone. That menu does not change when the Dag is scheduled. Templates stay in UTC too.

The Dag timezone comes from an aware start_date. A naive one uses default_timezone. Cron on a timezone-aware Dag follows daylight saving time. The docs' example is a start_date in US/Eastern and 0 0 * * *: the run is at 04:00 UTC during daylight saving time and at 05:00 UTC otherwise. CronTriggerTimetable takes its own timezone argument. A timedelta schedule follows daylight saving for the start, then does not shift later runs.

US/Eastern and America/New_York both pass the check's timezone field. The word system, which default_timezone accepts, is not an IANA name, and the check rejects it. Put the IANA zone the Dag evaluates, and read the skipped hour in cron jobs and daylight saving time.

SLA is gone

The SLA feature from Airflow 2 was removed in Airflow 3.0. Airflow 3.1 replaced it with Deadline Alerts. The upgrade notes list SLAs as removed.

The old check ran when the Dag run finished. If the clock was past logical_date plus the SLA, Airflow called sla_miss_callback. If the run never finished, the SLA was never checked.

A Deadline Alert is stored when a Dag run starts: a reference plus an interval. The scheduler then notices when that time has passed and runs the callback, without waiting for the run to finish. Deadline Alerts are marked experimental, added in 3.1. They do not exist for a run that was never created. A stopped scheduler, a paused Dag, and a file that failed to parse never start a run, so there is no deadline to miss.

on_failure_callback is the failure hook that does exist. It runs when the task or the Dag fails. on_retry_callback runs when the task is up for retry. on_skipped_callback does not run when the task never started because a trigger rule or a branch skipped it. Callbacks run only when a worker changes the state. Marking a task failed or successful from the CLI or the UI does not call them. Errors inside a callback show up in the Dag processor log, not the task log, and that processor log is not in the UI by default.

The grid shows runs that were created

These documented cases leave no successful ping:

  • No scheduler is running, or use_job_schedule is False and nobody triggered the Dag.
  • The Dag is paused, including a new Dag under the default dags_are_paused_at_creation, or it was auto-paused after consecutive failures.
  • The file is ignored, fails to import, exceeds dagbag_import_timeout, or is blocked because the inflation check is set to error.
  • catchup=False skipped the missed ticks. The immediate run, if there is one, is the most recent applicable time, which can be hours after that timestamp.
  • max_active_runs stopped the scheduler from creating another Dag run, or max_active_tasks or a pool left the task queued.
  • The work task failed or timed out, and the ping task is downstream with the default all_success rule, so it is skipped.
  • BashOperator skip_on_exit_code defaults to 99. That exit skips the task. A downstream ping with all_success is skipped too.

CronNudge does not call the Airflow API, cannot read Dag run state, and cannot trigger or retry a Dag. It only knows about pings it receives. The grid is still where you open a run that did start.

Ping after the work succeeds

The success URL is https://cronnudge.com/ping/YOUR_ID. GET, POST, and HEAD all count. A stored ping answers ok with Cache-Control: no-store. YOUR_ID is the ping id, not the badge id. Anyone with that URL can send a ping. Keep the value free of a query string and of /start or /fail.

Do not hard-code it. Best practice is to keep a secret out of the Dag file. A Connection, read inside the task by connection id, is the documented store for tokens. The samples use a Variable, which is the documented key-value store, or an environment variable on the worker. Variable.get at the top of the file runs on every parse and can push the file past dagbag_import_timeout. Read it inside the task, or pass {{ var.value.get('cronnudge_url') }} so the lookup waits until the task runs.

BashOperator runs a bash command. env is templated. append_env defaults to False, which replaces the process environment, so curl can disappear from PATH. append_env=True keeps the inherited environment and sets CRONNUDGE_URL on top. The ping task is downstream of the work. The default trigger rule is all_success, so the ping does not run when the work fails.

from airflow.providers.standard.operators.bash import BashOperator
from airflow.sdk import DAG
import pendulum

with DAG(
    dag_id="nightly",
    start_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
    schedule="0 0 * * *",
    catchup=False,
):
    work = BashOperator(task_id="work", bash_command="./do-the-work")
    ping = BashOperator(
        task_id="ping",
        bash_command='curl -fsS -m 10 --retry 3 "$CRONNUDGE_URL"',
        env={"CRONNUDGE_URL": "{{ var.value.get('cronnudge_url') }}"},
        append_env=True,
    )
    work >> ping

-f fails on an HTTP error, -sS is quiet unless curl fails, -m 10 caps the wait at 10 seconds, and --retry 3 retries transport failures. A non-zero curl then fails the ping task. Append || true on that command when a monitoring hiccup should leave the Dag green. The ping is still missed, and the check alerts after grace.

The same ping in a Python task, with the standard library. Importing inside the function keeps a missing library from breaking parse. urlopen raises on an HTTP error, so the try is what keeps that from failing the task.

from airflow.sdk import Variable, task

@task
def ping():
    import urllib.request

    url = Variable.get("cronnudge_url").split("?", 1)[0].rstrip("/")
    try:
        urllib.request.urlopen(url, timeout=10).read()
    except Exception as exc:
        print(f"heartbeat ping failed: {exc}")

requests is the same GET if the task already uses it. Import it inside the function. requests.get does not raise on an HTTP status unless you call raise_for_status().

@task
def ping():
    import requests
    from airflow.sdk import Variable

    url = Variable.get("cronnudge_url").split("?", 1)[0].rstrip("/")
    try:
        requests.get(url, timeout=10).raise_for_status()
    except Exception as exc:
        print(f"heartbeat ping failed: {exc}")

os.environ["CRONNUDGE_URL"] is the environment-variable form of the same read. Do it inside the task, not at import time.

Pass the exit code

?exit= accepts an integer from 0 to 255. 0 is a success. 1 through 255 is a failure: the check is marked down immediately when it was not already down. Anything else is ignored, and the ping stays a success. Use this or /fail, not both.

ping = BashOperator(
    task_id="ping",
    bash_command="""
code=0
./do-the-work || code=$?
curl -fsS -m 10 --retry 3 "$CRONNUDGE_URL?exit=$code" || true
exit "$code"
""",
    env={"CRONNUDGE_URL": "{{ var.value.get('cronnudge_url') }}"},
    append_env=True,
)

That task is the work and the ping together. Do not also add a downstream success ping, and do not also set on_failure_callback on it. exit 99 hits the default skip_on_exit_code and skips the task instead of failing it.

/fail is the same immediate down alert. A paused check stores the ping and does not alert. A second failure while the check is already down does not send another alert. One alert when it goes down, and one when a later success recovers it.

Put the callback on the work task, not on the ping task. It runs when that task fails. It does not run when the task is skipped, and it does not run when the Dag run was never created. on_retry_callback is the hook for "up for retry." Leave /fail off that one if a retry should not page you. A later success ping is the recovery if /fail already marked the check down.

def ping_fail(context):
    import urllib.request
    from airflow.sdk import Variable

    url = Variable.get("cronnudge_url").split("?", 1)[0].rstrip("/")
    urllib.request.urlopen(url + "/fail", timeout=10).read()

work = BashOperator(
    task_id="work",
    bash_command="./do-the-work",
    on_failure_callback=ping_fail,
)

A run that never starts never reaches either path. The missed success ping is the alert after grace.

/start and a max runtime

/start records a start. It is not a success. Turn on "Track start and finish," or set Max runtime (seconds), which turns run tracking on. A second /start while a run is open is an overlap alert and does not close the first run. A success or /fail closes the open runs. Two success pings alone do not raise an overlap alert.

Max runtime is 1 second through 7 days. With a run open and a max runtime set, the deadline becomes that start plus the max runtime. It is not the earlier of that and the schedule. No finish means one stuck alert, once for that start, and the check goes down. A later success is the recovery. With run tracking and no max runtime, an open run is due at the earlier of the schedule deadline and the start plus grace. The grace used for that run is at least 60 seconds. The alert is down, not stuck. A scheduler that never creates a run never calls /start, so it cannot go stuck. Silence until the schedule deadline is the alert. Free includes run tracking on 3 checks. Pro removes that cap. Details are in assertions, runs, and agents.

context["run_id"] is the run id the callback examples use. A retried /start with the same key is a replay. --retry can deliver /start twice when the first request was stored and the response was lost, and that second start is an overlap alert. The key is cut at 128 characters and matched per check, so the finish ping needs its own key. A repeated key does not open a second run. A cleared run that should count again needs a new key.

@task
def ping_start():
    import urllib.request
    from airflow.sdk import Variable, get_current_context

    url = Variable.get("cronnudge_url").split("?", 1)[0].rstrip("/")
    run_id = get_current_context()["run_id"]
    request = urllib.request.Request(
        url + "/start",
        headers={"Idempotency-Key": f"{run_id}-start"[:128]},
        method="POST",
    )
    try:
        urllib.request.urlopen(request, timeout=10).read()
    except Exception as exc:
        print(f"heartbeat ping failed: {exc}")

Set max runtime a little past the longest healthy Dag run, and shorter than execution_timeout when you want the stuck alert before Airflow kills the task. If the timeout wins first, the finish request never runs, and the open run alerts when max runtime elapses. Hangs are in cron job stuck or hanging. Overlapping runs are in prevent overlapping cron jobs.

Match the check to the cron

Copy the five fields and set the check timezone to the zone the Dag evaluates. The check's timezone has to be an IANA name, and UTC is one. The cron tool lists the next runs before grace is added.

The form's periods are 5 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours, 1 day, and 1 week. Grace is none, 1 minute, 5 minutes (the default), 15 minutes, or 1 hour. Anything else, from the plan minimum up to 31 days for an interval and from 0 through 7 days for grace, is an API value, and the API is on Pro. Creating a check sets the first deadline from that moment. A Dag you trigger by hand stores a ping when it reaches the ping task. A success then moves the deadline. An interval counts from the last success. A cron expression uses the next occurrence after that success, then adds grace.

The scheduler loop is a minute by default, and the tasks still have to finish. The default grace is 5 minutes. A short final task fits. A Dag that is still running at the deadline alerts, and the late success is the recovery.

Every night at midnight UTC, Airflow 3 default. Schedule 0 0 * * * or @daily, create_cron_data_intervals left False. Check 0 0 * * *, timezone UTC. A success at 00:02 is inside the default 5 minutes of grace. The next deadline is 00:05 the next night. A run that never pings alerts at 00:05. A Dag that pings at 00:20 is past 00:05, so the check alerts and that success is the recovery. One hour of grace is the form value when the tasks themselves take most of an hour. The deadline is then 01:00.

The same five fields are right for the data-interval timetable. run_after for 0 0 * * * is still midnight. logical_date is the previous midnight. The ping is not a day late on the clock.

Unpause in the afternoon, catchup off. The docs' 15:00 example creates a run immediately for midnight already passed. Five minutes of grace ended at 00:05. The ping is a recovery, not a silent success. The following midnight is the tick that should land inside grace. Widen grace only if the healthy run is actually late, not to hide that first catch-up run.

Timedelta, catchup off, trigger timetable. The first run is at pickup, then every delta after that. A 1-day interval plus grace is due 24 hours plus grace after the last success. A cron of 0 0 * * * expects midnight and will alert when pickup is not near midnight. Use the interval when the schedule is a timedelta. If you turned on data intervals, the window ends at pickup instead, and the interval check still matches the gap between successes.

@hourly. The cron is 0 * * * *. That is slower than Free's 5-minute minimum, so it is a Free check. * * * * * is every minute. It is valid cron and it is not a Free check. Pro's minimum is 1 minute.

catchup=True. Several runs can ping as they finish, up to max_active_runs. Two success pings do not raise an overlap alert. They can still miss a 5-minute grace if the backlog finishes hours after the tick. The late success is a recovery. That is the backlog being late. An interval check would not notice, because it only counts from the last success.

Free is 10 checks, a 5-minute minimum interval, email plus one Slack or Discord channel, and run tracking on 3 checks. Pro is $12 a month for 100 checks, a 1-minute minimum, signed webhooks, and the API. Details are on pricing.

FAQ

Does Airflow tell me when a scheduled Dag never starts? No. The UI lists Dag runs that were created. A stopped scheduler, a paused Dag, or a file that does not load creates nothing. Deadline Alerts are stored when a run starts. on_failure_callback runs when a worker marks a task or the Dag failed. Neither runs when no run was created. A ping after the work is the alert.

When does a cron schedule start the run? In Airflow 3 a bare cron string uses CronTriggerTimetable, because create_cron_data_intervals defaults to False. The run is the cron tick, and logical_date is that tick. Airflow 2.x defaults the flag to True, which uses CronDataIntervalTimetable: the run waits until the interval ends, and logical_date is the start of the window. For 0 0 * * * both are eligible at midnight. schedule_interval was removed in Airflow 3.0. The argument is schedule.

Why is a new Dag paused and not running? dags_are_paused_at_creation defaults to True. A paused Dag does not schedule task instances. Manual runs are still allowed. Unpause it before you expect the cron. Consecutive failures can also pause it if max_consecutive_failed_dag_runs_per_dag is set. That default is 0, which means never.

What do catchup and max_active_runs change? catchup defaults to False. Missed ticks are not backfilled. Unpausing with a past start_date creates a run for the most recent applicable time, which can be hours after that timestamp, and skips the ticks in between. catchup=True creates one run per missed time, up to max_active_runs. The default is 16, and the scheduler does not create more Dag runs past that limit. max_active_tasks queues task instances past its limit. A queued task has not pinged.

Does a failed task alert immediately? Only if a ping is sent. A downstream ping with the default all_success rule does not run when the work fails, and on_skipped_callback does not run for that skip. on_failure_callback on the work task can call /fail. ?exit= from 1 to 255 does the same. exit=0 is a success. A value outside 0 to 255 is ignored. A second failure while the check is already down does not send another alert. A run that never starts never reaches the callback, so the missed success ping is the alert after grace.

Can CronNudge read the Dag run or start the Dag? No. It does not call the Airflow API, read Dag run state, or trigger or retry a Dag. It only knows about pings it receives. The grid is still where you open a run that did start.


The scheduler creates a run. The grid is the run you go looking for. The ping is how you hear about the run that never called home. Create the check, or read the five fields on the cron tool. Related: how to monitor cron jobs, crontab not running, cron expression examples, Celery beat, Prefect flow schedules, Dagster schedules and sensors, and the Python docs.