Skip to content

fixed schdule drift (happy path)#7047

Open
r90727 wants to merge 5 commits intodnnsoftware:developfrom
r90727:fix/scheduler-happy-path-drift
Open

fixed schdule drift (happy path)#7047
r90727 wants to merge 5 commits intodnnsoftware:developfrom
r90727:fix/scheduler-happy-path-drift

Conversation

@r90727
Copy link
Contributor

@r90727 r90727 commented Mar 1, 2026

Fixes #7045

Summary

This change fixes scheduler cadence drift on the happy path (successful completion and manual stop completion).

Previously, the next execution time could be calculated from StartDate in parts of the success/stop flow, which shifts future runs when a task starts late. This patch consistently advances NextStart from the previously scheduled NextStart value so recurring tasks stay anchored to their configured cadence (for example, hourly tasks remain on the hour).

Retry/error behavior is intentionally unchanged (WorkErrored still uses StartDate), so retry timing semantics remain the same.

If you want me to address Error/Retry logic, let me know.

image

Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to track the inner workings of this a bit more before I can leave a solid review/approval on this, however, I do not believe that this solution is going to be proper, there is a different handling with the CatchUpEnabled flag, and this change essentially removes that difference so I need to walk through what the ramifications are for this.

@r90727
Copy link
Contributor Author

r90727 commented Mar 1, 2026

@mitchelsellers CatchUpEnabled flag logic was originally based on NextStart for s/m/h/d TimeLapseMeasurement, but later commits switched to StartDate logic.

I'm just trying to fix the happy path, the CatchUpEnabled branch can be reverted. lmk

@mitchelsellers
Copy link
Contributor

Yeah it looks really odd that it isn't all done the same way

@r90727
Copy link
Contributor Author

r90727 commented Mar 1, 2026

@mitchelsellers here's the commit, probably copy/paste error: 6bc83a2

@bdukes bdukes added this to the 10.2.4 milestone Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Scheduler's reliance on "StartDate" to set "NextStart" guarantees time drift

3 participants