我有一个 Windows 应用程序,我正在获取所有计划的 Windows 任务。现在我想更改Next Run Time
任何特定任务的。我正在使用 C#
using (TaskService ts = new TaskService())
{
//Gets List Of Tasks in a folder. For Root Folder use backslash
TaskFolder taskFolder = ts.GetFolder(@"\");
TaskCollection col = taskFolder.Tasks;
foreach (Task t in col)
{
taskName = t.Name;
cbJobList.Items.Add(taskName);
lastRuntime = t.LastRunTime;
nextRunTime = t.NextRunTime;
TaskDefinition taskDef = t.Definition;
ActionCollection actionCol = taskDef.Actions;
}
}