Skip to content

No more dagruns after changing schedule interval #66754

Closed

Description

@wolfier

Under which category would you file this issue?

Airflow Core

Apache Airflow version

3.2.1

What happened and how to reproduce it?

After updating the Dag schedule from 0 * * * * to 0 0 * * *, no more dagruns were created. The scheduler started outputting these logs.

2026-05-12T05:04:45.798844Z [warning  ] run already exists; skipping dagrun creation [airflow.jobs.scheduler_job_runner.SchedulerJobRunner] dag_id=schedule_change loc=scheduler_job_runner.py:1958 logical_date=datetime.datetime(2026, 5, 4, 0, 0, tzinfo=Timezone('UTC'))

I was able to reproduce the behaviour with the following Dag.

from airflow.models import DAG
from airflow.decorators import task
from datetime import datetime

with DAG(
    dag_id="schedule_change",
    start_date=datetime(2026, 5, 4),
    end_date=datetime(2026, 5, 4,
    schedule='0 * * * *',
    catchup=True,
    max_active_runs=1,
) as dag:

    @task
    def do_something():
        import time
        time.sleep(1)

    do_something()

Once unapused, one dagruns with run_id scheduled__2026-05-04T01:00:00+00:00 and logical date 2026-05-04 00:00:00 is created. Next, remove the end_date parameter and update the schedule interval to "0 * * * *" (run daily) from "0 0 * * *" (run hourly). The expected behaviour is for a new dagrun with logical date 2026-05-05 00:00:00 to be created. However, no dagrun is created at all.

The scheduler did attempt to create a dagrun but a dagrun with the expected logical date already exist.

One important thing to note is that the deployment uses CronDataIntervalTimetable since AIRFLOW__SCHEDULER__CREATE_CRON_DATA_INTERVALS==True.

What you think should happen instead?

I think the scheduler should create a dagrun with logical date 2026-05-05 00:00:00 but instead it is stuck trying to create a dagrun with logical date 2026-05-04 00:00:00.

Operating System

No response

Deployment

Astronomer

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on May 12, 2026
  2. added
    priority:high
    on May 12, 2026
  3. removed
    needs-triage
    on May 12, 2026
  4. tvc12 commented on May 15, 2026

    @tvc12

    Same the issue.
    Hotfix:
    delete all task_instance and dag_run related from logical_date=datetime.datetime(2026, 5, 4, 0, 0, tzinfo=Timezone('UTC'))

    DELETE FROM task_instance
    WHERE dag_id IN (
        SELECT dag_id FROM (
            SELECT dag_id FROM dag_run
            WHERE dag_id =' xxx' and logical_date >= 'time logical_date error'
        ) AS tmp
    );
    
    DELETE FROM dag_run
     WHERE dag_id = 'xxx' and logical_date >= 'time logical_date error'
    
  5. self-assigned this
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:corearea:schedulerkind:bugpriority:high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions