Skip to content

Commit

Permalink
changed next run calculation to only consider now
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqsl committed Jul 24, 2024
1 parent b8f3912 commit 611c155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JobScheduler.Providers.Dynamics/CrmStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task<IEnumerable<JobInstance>> GetReadyJobs(DateTimeOffset now, Can
new CustomActionExecutionStrategy(job.BcGoV_Endpoint),
new CronSchedule(CronExpression.Create(job.BcGoV_CroneXpResSiOn)));

job.BcGoV_NextRuntime = DateTime.SpecifyKind(jobDescription.Schedule.GetNextRun(job.BcGoV_LastRuntime ?? now).DateTime, DateTimeKind.Local);
job.BcGoV_NextRuntime = DateTime.SpecifyKind(jobDescription.Schedule.GetNextRun(now).DateTime, DateTimeKind.Local);
context.UpdateObject(job);

if (!isFirstTimeJob)
Expand Down

0 comments on commit 611c155

Please sign in to comment.