You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/25 09:32:53 UTC

[GitHub] [airflow] HerrB92 commented on a diff in pull request #25883: Update templates-ref.rst

HerrB92 commented on code in PR #25883:
URL: https://github.com/apache/airflow/pull/25883#discussion_r954740113


##########
docs/apache-airflow/templates-ref.rst:
##########
@@ -26,12 +26,29 @@ The following come for free out of the box with Airflow.
 Additional custom macros can be added globally through :doc:`/plugins`, or at a DAG level through the
 ``DAG.user_defined_macros`` argument.
 
+.. _templates:basics:
+
+Note on Scheduling Basics
+-------------------------
+
+Airflow schedules tasks at the **end** of the interval (see :doc:`/scheduler`).
+
+Meaning that when you do:
+ | start_date: datetime(2018, 1, 1, 8, 0,0)
+ | schedule_interval: '0 8 * * *'
+ 
+The first run will kick in at ``2018-01-02 at 08:00+-`` (depends on resources) - but ds and ds_nodash will 
+contain ``2018-01-01``/``20180101`` as **logical** start date. That is **yesterday** from the point of view
+of the actual execution day.
+
+(Elad Kalif/Peter Mortensen: https://stackoverflow.com/a/65196624)

Review Comment:
   Yes, there are. That is why I added the reference as first line (see :doc:`/scheduler`). Unfortunately, the explanation there is not that easy to understand, that as a result "ds" contains "yesterday".
   
   As in the scheduler explanation the reference to ds etc. does not belong (IMHO), I would like to see it here - as by using Google & searching for ds etc. you will like land here, first.
   
   But I agree with you that I can reduce the explanation to a short sentence.
   
   Beside that I have also now an example for the use of macros and I will add it.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org