public SchedulerRegistry(ScheduledTaskWorker worker) { int interval = Int32.Parse(ConfigurationManager.AppSettings["UpdateInterval"]); Schedule(async() => { await worker.RunAsync(); } ).NonReentrant().ToRunNow().AndEvery(interval).Seconds(); }
public SchedulerRegistry(ScheduledTaskWorker worker) { int interval = Int32.Parse(ConfigurationManager.AppSettings["UpdateInterval"]); Schedule(() => { worker.Run(); }).NonReentrant().ToRunNow().AndEvery(interval).Minutes(); }