apache / apache/airflow

first run after turning on will be the latest scheduled run

Open
#45,768 3 comments 0 reactions 0 assignees View on GitHub
kind:feature kind:meta
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Body

Description
Currently, catchup=False means "first run after turning on will be the latest scheduled run" and there is no way to produce the behavior where turning on a DAG means "make the first run after turning on occur at the next schedule time instead of the previous one".

Proposal: make a new flag (call it something to the effect of no_catchup_means_no_past_runs) which when set to True means that turning on a DAG that has the setting catchup=False will result in the first run being the one on the schedule that occurs next in time (rather than the one that occurs in the most recent past).

Use case/motivation
The use case is whenever you want to turn on a DAG without it running right away.

### Committer

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

Contributor guide

Open the contributing guide

Research direction

Start by tracing Airflow's scheduler and DAG scheduling entry points for catchup=False. Determine where the first run is selected relative to the current time, then define how the proposed flag changes that behavior without affecting existing catchup semantics. Done means a documented, tested option that starts the first run at the next scheduled time.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.