SA Saturday If set to 1, specifies that the task can run on Saturday. Day of the Week (2 bytes): Undefined bits are set to 0 when sent and ignored upon receipt. of the Year The Month of the Year 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 Month of the Year 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 0 0 0 0 D E N O O C S E A U J L J U M A A P M R F E J A Value Description JA January If set to 1, specifies that the task can run in January. FE February If set to 1, specifies that the task can run in February. MR March If set to 1, specifies that the task can run in March. AP April If set to 1, specifies that the task can run in April. MA May If set to 1, specifies that the task can run in May. JU June If set to 1, specifies that the task can run in June. JL July If set to 1, specifies that the task can run in July. AU August If set to 1, specifies that the task can run in August. SE September If set to 1, specifies that the task can run in September. OC October If set to 1, specifies that the task can run in October.
StopExisting: Specifies that the running instance can be stopped and a new instance can be started on any additional trigger occurrence. DisallowStartIfOnBatteries The task may not start if the computer is running on batteries, unless this field is present and set to FALSE. StopIfGoingOnBatteries The task can be stopped if the computer switches to battery or Uninterrupted Power Supply (UPS) power, unless this field is present and set to FALSE. AllowHardTerminate The task can be forcibly stopped if it exceeds its absolute execution time limit, unless this field is present and is set to FALSE. StartWhenAvailable If present and set to TRUE, this field specifies that the task can start when the computer becomes available if a scheduled run time was missed. This field applies only to time-based tasks with an end boundary or time-based tasks that are set to repeat infinitely. RunOnNetworkAvailable If present and set to TRUE, this specifies that the task can start only if a network connection is available. NetworkSettings The NetworkSettings can be ignored unless the RunOnNetworkAvailable field (section ) is present and set to TRUE.<27> If present and either the Name or Id subfields are present, this specifies a network. The task can only start if a network connection to the specified network is available. <!-- NetworkSettings --> <xs:complexType name="networkSettingsType"> <xs:all> <xs:element name="Name" type="nonEmptyString" minOccurs="0"/> <xs:element name="Id" type="guidType" minOccurs="0"/> </xs:all> </xs:complexType> Name: If present, this field contains a string name of a network. Only name formats supported by the operating system can be used. Id: If present, this contains a GUID (section ) specifying a network. WakeToRun If present and set to TRUE, this field specifies that the task can be run by awakening the computer from power-suspended mode (standby or hibernate).
<7> Section 2.3.4: The Windows implementation returns 0x00000057. <8> Section 2.3.4: The Windows implementation returns 0x00000057. <9> Section 2.3.8: In Microsoft implementations, this protocol supports any authentication supported by the underlying operating system. For more information on authentication in Windows, see . <10> Section 2.3.14: Windows returns failure codes to invoking applications uninterpreted. In addition to the error codes, as specified in , the Windows Task Scheduler server also uses the following HRESULT error codes: Meaning S_OK 0x00000000 The method succeeded. S_FALSE 0x00000001 Alternate success code. E_OUTOFMEMORY 0x80000002 The server ran out of memory. E_ACCESSDENIED 0x80000009 Access is denied due to incorrect user name and password combination. E_INVALIDARG 0x80000003 One or more parameters are invalid. E_FAIL 0x80000008 An unspecified error occurred. E_UNEXPECTED 0x8000FFFF An unexpected error occurred. SCHED_S_TASK_READY 0x00041300 The task is ready to run at its next scheduled time. SCHED_S_TASK_RUNNING 0x00041301 The task is currently running. SCHED_S_TASK_DISABLED 0x00041302 The task will not run at the scheduled times because it has been disabled. SCHED_S_TASK_HAS_NOT_RUN 0x00041303 The task has not yet run. SCHED_S_TASK_NO_MORE_RUNS 0x00041304 There are no more runs scheduled for this task.
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 event 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 There 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.
SCHED_E_ACCOUNT_INFORMATION_NOT_SET 0x8004130F No account information could be found in the Task Scheduler Remoting Protocol security database for the task indicated. SCHED_E_ACCOUNT_NAME_NOT_FOUND 0x80041310 Unable to establish existence of the account specified. SCHED_E_ACCOUNT_DBASE_CORRUPT 0x80041311 Corruption was detected in the Task Scheduler Remoting Protocol security database. SCHED_E_NO_SECURITY_SERVICES 0x80041312 The server is not running Windows NT operating system. The following Microsoft implementations return this code: Windows 95 operating system, Microsoft Windows 98 operating system, and Windows Millennium Edition operating system. SCHED_E_UNKNOWN_OBJECT_VERSION 0x80041313 The task object version is either unsupported or invalid. SCHED_E_UNSUPPORTED_ACCOUNT_OPTION 0x80041314 The task has been configured with an unsupported combination of account settings and run time options. SCHED_E_SERVICE_NOT_RUNNING 0x80041315 The Task Scheduler Remoting
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 write the following values:
J 25 37 L 44 20 20 18 M 53 17 Message processing 74 server 79 77 91 77 83 Messages 17 17 17 34 35 36 50 N 61 79 80 81 82 51 39 12 O Operations flow examples 126 124 124 14 14 P 122 Packet sequence for task creation examples 122 122 122 123 61 62 61 29 20 20 18 24 39 15 15 54 53 135 23 R 12 13 12 39 42 14 29 50 28 54 51 121 S 90 89 65 130 87 88 131 103 115 120 106 109 107 110 117 119 105 118 92 93 115 103 112 116 104 112 111 Security 128 128 Sequencing rules 74 server 79