ephraimbuddy commented on issue #26991:
URL: https://github.com/apache/airflow/issues/26991#issuecomment-1277956129

   > @ephraimbuddy, Aha!
   > 
   > I had the `start_date` set to ` datetime.datetime.now(tz=localtz) - 
datetime.timedelta(days=2)` and `catchup = False`. I changed the start_date to 
a couple months ago and reset the crontab to run and it ran.
   > 
   > I've generally not used the start_date for anything meaningful and we 
don't have tasks that should backfill, and so those were standard parameters 
(so standard that I have a separate constructor that sets the defaults if not 
explicitly set). Should I infer from this that the `start_date` must be some 
time before the last full interval that is being run?
   > 
   > Is there any utility to `start_date` except in conjunction with `catchup` 
in order to backfill iterative tasks (or to hard-code a future start date)? 
Would it be better to set the start date to, say, the start of epoch if it's 
not used to avoid issues like this, or would that have other side effects?
   
   `start_date` is very important to airflow, it's what is used to calculate 
when your dag should run. Whether you need backfilling or not, it's important 
to set the start_date to a date in the past. Not necessary to set it to the 
start of epoch, the important thing is that it's static and in the past. 
   Due to how databases handle date & time, I won't recommend using the start 
of epoch. You can have the dates be the start of a year in the past e.g 
datetime(2022,1,1)


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