eladkal commented on code in PR #32392: URL: https://github.com/apache/airflow/pull/32392#discussion_r1254044806
########## docs/apache-airflow/authoring-and-scheduling/timetable.rst: ########## @@ -217,3 +228,24 @@ is immediately triggered after you re-enable the DAG. By these examples, you see how `CronTriggerTimetable`_ triggers DAG runs is more intuitive and more similar to what people expect cron to behave than how `CronDataIntervalTimetable`_ does. + + +.. _Differences between the two data intervals timetables: + +Differences between the two data intervals timetables: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As for the wo cron timetables, there is no difference between both of the data interval timetables when ``catchup`` is ``True``. + +The main difference appears when ``catchup`` is ``False``. `DeltaDataIntervalTimetable`_ triggers a new DAG run with a data interval +ending at *the current time*, while `CronDataIntervalTimetable`_ triggers one with data interval aligned with the start date of the +DAG. + +For example, supposes that you want to run a DAG on every half hour: hh:00, hh:30. +On the one hand, you may use a `DeltaDataIntervalTimetable_` with ``datetime.timedelta(minutes=30)``, specifying a start date hour-aligned +(``datetime.datetime(year, 2, 1)``). When you enable the DAG at 00:35 on February 1st: +* if ``catchup`` is ``True``, a new DAG will be triggered with data interval covering 00:00 to 00:30 (aligned with start date); +* if ``catchup`` is ``False``, a new DAG will be triggered with data interval covering 00:35 to 00:35 (aligned with current time); Review Comment: This is not about TimeTables specifically.. it's about scheduling in general. Is this the right place to document this? I think this is better to be explained in https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dag-run.html#catchup and reference Timetable doc to the catchup doc -- 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]
