apache / apache/airflow

Timedelta dag backfill dates don't align with normal schedule

Open
#47,813 1 comment 0 reactions 0 assignees View on GitHub
affected_version:3.0 area:backfill area:core kind:meta priority:low
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Body

With a timedelta-scheduled dag, the logical dates that you get are relative to the start-date you provide when running the backfill command.

**This has been the behavior since 2.x**

So, e.g. suppose your dag has schedule of timedelta(days=1). Then, running this

```
airflow dags backfill test_backfill_dag__timedelta --start-date '2025-03-10 03:25:26' --end-date 2025-03-13 --dry-run
```

Will produce these runs:

```
"2025-03-10 03:25:26+00:00"
"2025-03-11 03:25:26+00:00"
"2025-03-12 03:25:26+00:00"
```

But if the schedule was cron schedule, then it would be what you would expect -- just the "partitions" that are within the range requested.

### Committer

- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Research direction

Start with the `airflow dags backfill` command and the timedelta-scheduled DAG behavior described in the examples. Compare its dry-run logical dates with the requested range and with cron scheduling; done means timedelta backfills produce dates aligned with the normal schedule.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.