uranusjr commented on issue #27399:
URL: https://github.com/apache/airflow/issues/27399#issuecomment-1533666824

   This is the logic to calculate the next run for `catchup=False`, for 
reference:
   
   ```python
   start_time_candidates = [self._align_to_next(DateTime.utcnow())]
   if last_automated_data_interval is not None:
       
start_time_candidates.append(self._get_next(last_automated_data_interval.end))
   if restriction.earliest is not None:
       start_time_candidates.append(self._align_to_next(restriction.earliest))
   next_start_time = max(start_time_candidates)
   ``
   
   The two `if` blocks should be fine since they match the logic for 
`catchup=True`. So I wonder if the problem is from the `max` call—maybe under 
some edge cases that `max` would wrongly select the `next(utcnow)` result 
(first line) instead of the actual schedule it should use—when the scheduler 
took too much time to schedule the previous run, perhaps?
   
   Also worth noting that `CronDataIntervalTimetable` (the old one) uses 
slightly different logic to account for the current time, and that timetable 
seems to be bug-free.


-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to