Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: trying to simply change tasks to disabled.

$
0
0
If the task already has been created, the Task.Enabled property does not require re-registration after. You should be able to simply call:
using (TaskService ts = new TaskService())
{
  Task t = ts.GetTask(taskName);
  if (t != null)
  {
    if (!t.Enabled)
    {
      t.Enabled = true;
    }
  }
}

Viewing all articles
Browse latest Browse all 2206

Trending Articles