The following eight fields all refer to the time this task most recently ran. When creating a job, the field values are to be ignored upon receipt. Value Meaning Year 1601 — 30827 The year (1601–30827), inclusive. Month 1 — 12 The month, January=1, February=2, …, December=12. Weekday 0 — 6 The day of the week, Sunday=0, Monday=1, …, Saturday=6. Day 1 — 31 The day of the month (1–31), inclusive. Hour 0 — 23 The hour of the day (0–23), inclusive. Minute 0 — 59 The minute of the hour (0–59), inclusive. Second 0 — 59 The seconds of the minute (0–59), inclusive. Milliseconds 0 — 999 Between 0 and 999, for values less than one second, inclusive. Variable-Length Data Section Immediately following the structure is the Variable-Length Data Section. The variable-length data section is composed of the following fields: Running Instance Count Application Name Parameters Working Directory Author Comment User Data Reserved Data Triggers Job Signature This section also contains the specification for specially formatted Unicode strings in section .
Name Value Fields ONCE 0x00000000 Not used DAILY 0x00000001 Section WEEKLY 0x00000002 Section MONTHLYDATE 0x00000003 Section MONTHLYDOW 0x00000004 Section EVENT_ON_IDLE 0x00000005 Not used EVENT_AT_SYSTEMSTART 0x00000006 Not used EVENT_AT_LOGON 0x00000007 Not used When the trigger type is ONCE, EVENT_ON_IDLE, EVENT_AT_SYSTEMSTART, or EVENT_AT_LOGON, the trigger-specific fields are set to 0. The different trigger use some shared bit fields, as indicated in the following sections. Day of the Month The Day of the Month field is specified as follows. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 X A B C D E F G H I J K L M N O P Q R S T U V 9 8 7 6 5 4 3 2 1 X (1 bit): Unused. MUST be set to zero when sent and MUST be ignored on receipt. 1-31: Any bit set to 1 specifies that the task can run on that day of the More than one bit MAY be set to 1. Day of the Week The Day of the Week field is specified as follows. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 Day of the Week 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0 S A F R T H W E T U M O S U Day of the Week Flags
</xs:extension> </xs:complexContent> </xs:complexType> Delay: If present, this field contains a user-specified delay value as specified for "duration" in section . The task startup can be delayed after boot (ATSvc start-up) by the delay value. RegistrationTrigger If present, the RegistrationTrigger specifies that the task can after registration. <!-- RegistrationTrigger --> <xs:complexType name="registrationTriggerType"> <xs:complexContent> <xs:extension base="triggerBaseType"> <xs:sequence> <xs:element name="Delay" type="xs:duration" default="PT0M" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> If present, this field contains a user-specified delay value. The task can have a delayed start after task registration until the time interval specified by the delay value has elapsed. IdleTrigger If present, the IdleTrigger specifies that the task can when the machine becomes idle, as specified in section . <!-- IdleTrigger --> <xs:complexType name="idleTriggerType"> <xs:complexContent> <xs:extension base= "triggerBaseType "/> </xs:complexContent> </xs:complexType> TimeTrigger If present, the TimeTrigger specifies that the task can start at the specified StartBoundary time. <!-- TimeTrigger --> <xs:complexType name="timeTriggerType"> <xs:complexContent> <xs:extension base="triggerBaseType"> <xs:sequence> <xs:element name="RandomDelay" type="xs:duration" default="PT0M" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> RandomDelay: If present, this field contains a user-specified maximum delay value as specified for "time duration" in section .
SCHED_S_TASK_NOT_SCHEDULED 0x00041305 One or more of the properties that are required to run this task on a schedule have not been set, or no runs are scheduled. SCHED_S_TASK_TERMINATED 0x00041306 The last run of the task was terminated by the user. SCHED_S_TASK_NO_VALID_TRIGGERS 0x00041307 Either the task has no triggers or the existing triggers are disabled or not set. SCHED_S_EVENT_TRIGGER 0x00041308 The task contains only triggers that do not have set run times. SCHED_E_TRIGGER_NOT_FOUND 0x80041309 Trigger not found. SCHED_E_TASK_NOT_READY 0x8004130A One or more of the properties that are required to run this task have not been set. SCHED_E_TASK_NOT_RUNNING 0x8004130B is no running instance of the task. SCHED_E_SERVICE_NOT_INSTALLED 0x8004130C The Task Scheduler Remoting Protocol service is not installed on this computer. SCHED_E_CANNOT_OPEN_TASK 0x8004130D The task object could not be opened. SCHED_E_INVALID_TASK 0x8004130E The object is either an invalid task object or is not a task object.
Protocol service is not running. SCHED_E_UNEXPECTEDNODE 0x80041316 The task XML contains an unexpected node. SCHED_E_NAMESPACE 0x80041317 The task XML contains an element or attribute from an unexpected namespace. SCHED_E_INVALIDVALUE 0x80041318 The task XML contains a which is incorrectly formatted or out of range. SCHED_E_MISSINGNODE 0x80041319 The task XML is missing a required element or attribute. SCHED_E_MALFORMEDXML 0x8004131A The task XML is malformed. SCHED_S_SOME_TRIGGERS_FAILED 0x0004131B The task is registered, but not all specified triggers will the task. SCHED_S_BATCH_LOGON_PROBLEM 0x0004131C The task is registered, but may fail to start because the batch logon privilege is required to be enabled for the task principal. SCHED_E_TOO_MANY_NODES 0x8004131D The task XML contains too many nodes of the same type. SCHED_E_PAST_END_BOUNDARY 0x8004131E The task cannot be started after the trigger's end boundary. SCHED_E_ALREADY_RUNNING 0x8004131F An instance of this task is already running. SCHED_E_USER_NOT_LOGGED_ON The task will not run because the
0x80041320 user is not logged on. SCHED_E_INVALID_TASK_HASH 0x80041321 The task image is corrupt or has been tampered with. SCHED_E_SERVICE_NOT_AVAILABLE 0x80041322 The Task Scheduler Remoting Protocol service is not available. SCHED_E_SERVICE_TOO_BUSY 0x80041323 The Task Scheduler Remoting Protocol service is too busy to handle the request. SCHED_E_TASK_ATTEMPTED 0x80041324 The Task Scheduler Remoting Protocol service attempted to run the task, but the task did not run due to one of the constraints in the task definition. SCHED_S_TASK_QUEUED 0x00041325 The Task Scheduler Remoting Protocol service has asked the task to run. SCHED_E_TASK_DISABLED 0x80041326 The task is disabled. SCHED_E_TASK_NOT_V1_COMPAT 0x80041327 The task has properties that are not compatible with the SASec interface. SCHED_E_START_ON_DEMAND 0x80041328 The task settings do not allow the task to start on demand. <11> Section 2.4.1: Windows clients the following values:
Index . 25 A Abstract data model 64 75 58 51 50 15 29 20 20 18 64 130 29 B 42 C 46 15 147 Client 64 64 64 75 64 75 75 64 17 59 29 17 17 39 41 D 35 Data model - abstract 64 75 54 Data types 17 XML task definition format ( 39, 39) 33 33 121 52 51 54 17 E 59 52 25 77 44 Examples 125 operations flow 127 125 125 123 123 123 123 123 124 125 59 54 F Fields 62 16 16 25 21 Full IDL ( 130, 130, 131, 132) G 121 9 40 H
52 triggered events 64 77 I IDL ( 130, 130, 131, 132) 77 52 43 129 13 Initialization 64 76 9 69 J 25 37 L 45 20 20 18 M 53 17 Message processing 75 server 80 78 92 78 84 Messages 17 17 17 34 36 36 51 N 62 80 81 82 83 52 39 12 O Operations flow examples 127 125 125 14 14 P 123 Packet sequence for task creation examples 123 123 123 124 62 62 62 29 20 20 18 24 40 15 15 55 54 136 24 R 12 13 12 40 43 14 30 50 29 54 51 122 S