using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32.TaskScheduler;
namespace WinTaskScheduler
{
class Program
{
static void Main(string[] args)
{
using (TaskService ts = new TaskService())
{
RunningTaskCollection rtc = ts.GetRunningTasks();
foreach(Task t in rtc)
{
if (t.Enabled)
{
String name = t.Name;
DateTime dt = t.LastRunTime;
int lastResult = t.LastTaskResult;
DateTime nextRun = t.NextRunTime;
int numRuns = t.NumberOfMissedRuns;
String path = t.Path;
TaskState taskState = t.State; //taskState.ToString();
}
}
}
}
}
}