Ability to run tasks with interval

Jul 23, 2011 at 5:27 PM

Scenario: Say to run task1 with interval of 15 minutes. So even if task1 will not complete in 15minutes, scheduler will not run next copy, but rather will wait till completion and then after 15 minutes will run next instance.

Is this scenario possible?

 

Coordinator
Mar 10, 2012 at 2:25 PM

Yep, that's definitely possible.  The code could look something like:

TaskManager.AddTask(() => Console.WriteLine("Inline task: " + DateTime.Now), x => x.ToRunEvery(15).Minutes());