github-actions[bot] commented on issue #15610:
URL: 
https://github.com/apache/dolphinscheduler/issues/15610#issuecomment-1958754326

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
         The scheduling time of the workflow is 0:00 every day. Now the 
operation is run complementally. The setting time is 00:00:00~23:59:59 on a 
certain day. After running, theoretically only one instance will be generated 
at 0:00 on this day. , but the actual result is to generate two instances at 0 
o'clock on this day and the next day:
   
![image](https://github.com/apache/dolphinscheduler/assets/5569345/b88d3e95-b065-41ac-ae90-8c9011964357)
   
![image](https://github.com/apache/dolphinscheduler/assets/5569345/4dda3d13-37f9-4ad1-b6e9-7d572def463d)
   
![image](https://github.com/apache/dolphinscheduler/assets/5569345/79042580-7bb1-476b-a686-f7b531cd4d17)
         Later, I debugged the source code and found a piece of code for 
obtaining all scheduling times within the complement range: 
org.apache.dolphinscheduler.service.cron.CronUtils.getSelfFireDateList
   
![image](https://github.com/apache/dolphinscheduler/assets/5569345/70e99abd-20ea-4719-b79f-b3be2e17e65e)
   
![image](https://github.com/apache/dolphinscheduler/assets/5569345/b4c3e066-c43e-474a-9e09-c439023c80a1)
         In order to support the left-closed and right-closed time interval, 
the start time is reduced by 1s and the end time is added by 1s, which becomes 
23:59:59 yesterday to 00:00:00 the next day. Two scheduling time points are 
searched for later.
         
   
   
   
   
   ### What you expected to happen
   
   I hope this scheduling threshold issue will be fixed soon.
   
   ### How to reproduce
   
   This problem is easy to reproduce when complementing the number. As long as 
the end time of the complement range is exactly 1 second later than the 
scheduling time point, the final deployment instance will be one more than 
expected.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)


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