public void ScheduleJob() { Task.Factory.StartNew(async() => { while (true) { _dmvOfficeJob.Execute(); await Task.Delay(new TimeSpan(30, 0, 0, 0)); } }); }
public void ScheduleJob() { Task.Factory.StartNew(async() => { while (true) { _dmvBestVisitJob.Execute(); await Task.Delay(60 * 1000); } }); }
public void ScheduleJob() { Task.Factory.StartNew(async() => { while (true) { if (OfficeIsOpen(DateTime.Now)) { _dmvWaitTimeJob.Execute(); } await Task.Delay(60 * 1000); } }); }