1

I'm using Task Scheduler Managed Wrapper from Codeplex and I need to fire task as soon as possible and only once. I don't found any API that could execute created task immediately (I can be wrong). So how can I create a trigger that fires only once and as soon as possible?

user1016945
  • 877
  • 3
  • 22
  • 38

1 Answers1

5

Found solution here.

using (TaskService ts = new TaskService())
{
   string task = "TaskName";
   // This will find it even if its down in a folder. Alternately you could call:
   // Task t = ts.GetTask(task);
   Task t = ts.FindTask(task);
   if (t != null)
      t.Run();
}
user1016945
  • 877
  • 3
  • 22
  • 38