FluentScheduler icon indicating copy to clipboard operation
FluentScheduler copied to clipboard

Time drift.

Open Immac opened this issue 4 years ago • 1 comments

The time starts to drift , in this example I want the job to fire once every minute, but as you can see the milliseconds start to accumulate.

JobManager.Initialize();
            Console.WriteLine($"Scheduled: {DateTime.Now:O}");
            Action p = () => Console.WriteLine($"Fired: {DateTime.Now:O}");
            JobManager.AddJob(
                () => JobManager.AddJob(p,
                s => s.ToRunEvery(1).Minutes()
                )
                ,
                s => s.ToRunOnceAt(DateTime.Now.Hour, DateTime.Now.Minute + 1)
            ) ;
            Console.ReadKey(true);
        }

image

image

Immac avatar Feb 09 '21 19:02 Immac

Duplicate of #261

MarkusKgit avatar Feb 10 '21 06:02 MarkusKgit