HI all ,
I am facing a problem, I have a process which is running in task scheduler for some reasons this task STATUS is getting disabled often, so I had to write a program to check this task is running or not, if not I need to set my task Enabled = true; here is the piece of code
I am facing a problem, I have a process which is running in task scheduler for some reasons this task STATUS is getting disabled often, so I had to write a program to check this task is running or not, if not I need to set my task Enabled = true; here is the piece of code
using (TaskService ts = new TaskService())
{
bool isEnabled = false;
isEnabled = ts.GetTask("testtask").Enabled; // check task status
if (isEnabled == false)
{
// __I need to enable testtask__
}
}
can some one help me on this?