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


##########
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:

Review Comment:
   ```suggestion
   Going forward, you should use the ``schedule`` argument instead:
   ```



##########
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:

Review Comment:
   ```suggestion
   If you previously used the ``@daily`` cron preset, your DAG may have looked 
like this:
   ```



##########
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:

Review Comment:
   ```suggestion
   The same is true if you used a custom timetable.  Previously you would have 
used the ``timetable`` argument:
   ```



##########
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:

Review Comment:
   ```suggestion
   Now you should use the ``schedule`` argument:
   ```



##########
newsfragments/25410.significant.rst:
##########
@@ -0,0 +1,43 @@
+Deprecation of ``schedule_interval`` and ``timetable`` params

Review Comment:
   ```suggestion
   Deprecation of ``schedule_interval`` and ``timetable`` arguments
   ```



##########
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.

Review Comment:
   ```suggestion
   We added new DAG argument ``schedule`` that can accept a cron expression, 
timedelta object, *timetable* object, or list of dataset objects. Arguments 
``schedule_interval`` and ``timetable`` are deprecated.
   ```



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