예제 #1
0
 public static void ExecuteTask(TaskConfig _taskConfig)
 {
     TaskContent task = new TaskContent(_taskConfig);
     new Task(() =>
     {
         task.Excute(true);
     }).Start();
 }
예제 #2
0
 /// <summary>
 /// 导入任务
 /// </summary>
 private static void LoadTask(List <TimingTask> _taskList)
 {
     TaskConfigList = TaskConfigManage.LoadXML();
     foreach (var item in TaskConfigList)
     {
         TaskContent task   = new TaskContent(item);
         TimingTask  timing = new TimingTask();
         timing.TimingTaskExcuter = task;
         timing.TimingTaskType    = item.execfrequency;
         timing.ExcuteTime        = item.shorttime;
         _taskList.Add(timing);
     }
 }