manipatnam commented on code in PR #64162:
URL: https://github.com/apache/airflow/pull/64162#discussion_r3042841480
##########
airflow-core/docs/authoring-and-scheduling/timetable.rst:
##########
@@ -151,6 +151,63 @@ must be a :class:`datetime.timedelta` or
``dateutil.relativedelta.relativedelta`
def example_dag():
pass
+.. versionadded:: 3.0.0
+ The ``run_immediately`` argument was introduced in Airflow 3.
+
+The optional ``run_immediately`` argument controls which cron point is
scheduled when a Dag is first
+enabled or re-enabled after a pause. It has no effect when ``catchup=True`` or
when prior Dag runs
+already exist (in those cases the scheduler always continues from where it
left off).
+
Review Comment:
The implementation has been updated to match the docs — the pause/resume
branch now calls _calc_first_run() instead of unconditionally using
_align_to_prev(now), so run_immediately is respected after pause/resume as
well. With run_immediately=True (the default), behaviour is unchanged; with
False or a timedelta, the scheduler will now correctly skip/gate the most
recent past cron point after unpause.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]