khyurri commented on issue #8237: dag will never start if we set a cron string 
with a clear day of week to  the schedule_interval  arg 
URL: https://github.com/apache/airflow/issues/8237#issuecomment-612612040
 
 
   **How to reproduce**
   
   I set the value of `schedule_interval = '52 11 * * * '`, then I expect DAG 
will execute every day at 11:52 after the date of `start_date`.
   
   ```python
   start_date=datetime(year = 2020, day = 11, month = 4, hour = 0, minute = 0) 
#yesterday
   timezone.utcnow() #2020-04-12 12:47:37.304143+00:00
   ```
   
   I expect the DAG will execute twice (2020-04-11 11:52:00 and 2020-04-12 
11:52:00). But only one execution was obtained. 
   
   **Where is the problem?**
   
   The problem is in the `SchedulerJob.create_dag_run` method, in the condition 
`if next_run_date and period_end and period_end <= timezone.utcnow()`.
   The variable `period_end` gets value `next_run_date + interval`. In the last 
run It is always greater, than `timezone.utcnow()`.
   
   To fix this task, I will need to understand in detail how `period_end` and 
the condition` period_end <= timezone.utcnow () `should work.
   If no one else takes this issue, I can do it at the end of the next week.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to