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

Time drift. #298

Open
Immac opened this issue Feb 9, 2021 · 1 comment
Open

Time drift. #298

Immac opened this issue Feb 9, 2021 · 1 comment

Comments

@Immac
Copy link

Immac commented Feb 9, 2021

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

@MarkusKgit
Copy link

Duplicate of #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants