c# register scheduled task code example
Example: c# run a scheduled task
using (TaskService tasksrvc = new TaskService(@"\\" + servername, username, domain, password, true))
{
Task task = tasksrvc.FindTask(taskSchedulerName);
task.Run();
}