我想将任务计划程序中的“配置”设置为“Windows 7”。
当前的 C# 代码:
using (TaskService ts = new TaskService())
{
TaskDefinition td = ts.NewTask();
TimeTrigger trigger = new TimeTrigger();
var startTime = TimeSpan.Parse(section1["ScheduledTime"]);
trigger.StartBoundary = DateTime.Today + startTime;
trigger.Repetition.Interval = TimeSpan.FromDays(1);
td.Triggers.Add(trigger);
td.Actions.Add(new ExecAction(@"Data.exe", argument, null));
var foldername = ts.GetFolder(@"\Bigdata");
Console.WriteLine(foldername.Path);
foldername.RegisterTaskDefinition(section1["JobName"], td, TaskCreation.CreateOrUpdate, "service@geotab.local", "traincloudCubel!ne");
}
任何帮助,将不胜感激 !!