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

New Post: How to enable a task in task scheduler using C#?

$
0
0
dahall wrote:
You are almost there:
using (TaskService ts = new TaskService())
{
  Task t = ts.GetTask(taskName);
  if (t != null)
  {
    if (!t.Enabled)
    {
      t.Enabled = true;
      t.RegisterChanges();
    }
  }
}
AMAZING that worked .... I thought I was close enough but coudnt get get worked ...your solution is a magic...:)

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>