Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Run #320 #321

Open
wants to merge 6 commits into
base: version-6
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FluentScheduler/Scheduler/InternalSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ private async Task Run(CancellationToken token)

// used on both JobStarted and JobEnded events
var startTime = Calculator.Now();
// start time can be before NextRun, because of the nature of CPUs
// to ensure, that this does not run code twice, we can set the startTime to the "perfect" NextRun value
if (startTime < NextRun)
startTime = NextRun.Value;

// calculating the next run
// used on both JobEnded event and for the next run of this method
Expand Down