View All Task Scheduler programs in the system [csharp] TaskSchedulerClass ts = new TaskSchedulerClass (); ts. connect (null, null); ITaskFolder folder = ts. getFolder ("\"); IRegisteredTaskCollection tasks_exists = folder. getTasks (1); for (int I = 1; I <= tasks_exists.Count; I ++) {IRegisteredTask t = tasks_exists [I];} note that the subscript starts from 1. In this way, all scheduled tasks are traversed and their attributes can be viewed in sequence. If you want to create a scheduled task, you can manually create one and use this code to check the attributes of the task scheduler. 1. instantiate object [csharp] // instantiate the task object TaskSchedulerClass scheduler = new TaskSchedulerClass (); scheduler. connect (null, null); // connection Note: Only Connect can be used 2. set basic attribute [csharp] ITaskDefinition task = schedtion. newTask (0); task. registrationInfo. author = "BluceYoung"; // The Creator task. registrationInfo. description = "http://blog.csdn.net/bluceyoung"; // Description 3. set trigger There are many types of triggers, which will be found when you manually create a scheduled task. For example, the most common trigger is time-based, and the trigger every several days or months uses IDailyTrigger, this is used as an example for many websites. Here I will take ITimerTrigger as an example to implement the trigger effect in just a few minutes. [Csharp] ITimeTrigger tt = (ITimeTrigger) task. triggers. create (_ TASK_TRIGGER_TYPE2.TASK_TRIGGER_TIME); tt. repetition. interval = "PT30M"; // cycle time tt. startBoundary = "2013-01-21T14: 27: 25"; // The execution start time Interval attribute is the set cycle time, but it is not the number of milliseconds we are familiar. The value must meet the "PT1H1M" format, that is, it is executed several hours and several minutes. The value corresponds to the "repetition task interval" in the trigger dialog box, for example: the value will be converted to minutes and added to the trigger. Official explanation: The amount of time between each restart of the task. the format for this string is P <days> DT