Hello guys,
I found out that over the time passes, a time drift happens.
RecurringJobManager manager = new RecurringJobManager();
manager.RemoveIfExists("myjob");
manager.AddOrUpdate("myjob", Job.FromExpression(() => DoWork()), $"0 * * * *", TimeZoneInfo.Local);
In the code above, it’s supposed to execute DoWork
method on each hour, e.g. 09:00 pm, 10:00 pm, 11:00 pm, etc. What really happens is that it sometimes executes it at 10:00:09 which is not accurate as much as 10:00:00 is. Is that because the cron expression doesn’t include seconds?