jedcunningham commented on code in PR #25410:
URL: https://github.com/apache/airflow/pull/25410#discussion_r940775719


##########
newsfragments/25410.significant.rst:
##########
@@ -0,0 +1,43 @@
+Deprecation of ``schedule_interval`` and ``timetable`` params
+
+We add new DAG parameter ``schedule`` that can accept a cron expression, 
timedelta object, *timetable* object, or list of dataset objects. Params 
``schedule_interval`` and ``timetable`` are  deprecated.
+
+So if you previously used the ``@daily`` cron preset, your dag may have looked 
like this:
+
+.. code-block:: python
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        schedule_interval='@daily',
+    ) as dag:
+        ...
+
+Going forward, instead you should use the ``schedule`` param instead:
+
+.. code-block:: python
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        schedule='@daily',
+    ) as dag:
+        ...
+
+And the same is true if you used a custom timetable.  Previously you would 
have used the ``timetable`` param:
+
+.. code-block:: python
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        timetable=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),
+    ) as dag:
+        ...
+
+Now you should use the ``schedule`` param:
+
+.. code-block:: python
+    with DAG(
+        dag_id='my_example',
+        start_date=datetime(2021, 1, 1),
+        timetable=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 5)]),

Review Comment:
   ```suggestion
           schedule=EventsTimetable(event_dates=[pendulum.datetime(2022, 4, 
5)]),
   ```



-- 
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]

Reply via email to