2.5 XML Task Definition Format

The ITaskSchedulerService interface uses XML to define tasks. Tasks are XML documents that MUST adhere to the schema specified in this section.

The server MUST validate an XML task definition's conformance to this schema and return an error if invalid, as specified in section 3.2.5.4.2.

The task schema contains the following six top-level parts. The "Actions" part MUST be present.

Note The task schema is defined by xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task

 <!-- Task -->
 <xs:complexType name="taskType">
   <xs:all>
   <xs:element name="RegistrationInfo" type="registrationInfoType" minOccurs="0"/>
     <xs:element name="Triggers" type="triggersType" minOccurs="0"/>
     <xs:element name="Settings" type="settingsType" minOccurs="0"/>
     <xs:element name="Data" type="dataType" minOccurs="0"/>
     <xs:element name="Principals" type="principalsType" minOccurs="0"/>
     <xs:element name="Actions" type="actionsType"/>
   </xs:all>
   <xs:attribute name="version" type="versionType" use="optional"/>
 </xs:complexType>

RegistrationInfo: If present, this part MUST specify the task location, security settings, description, and version of the task. See section 2.5.2.

Triggers: If present, this part MUST specify the triggers (changes of state or time) that cause the task to be started. See section 2.5.3.

Settings: If present, this part MUST specify additional settings and/or constraints imposed on the task once a trigger is met. See section 2.5.4.

Data: If present, this part MUST specify a container for arbitrary data required by the tasks. See section 2.5.5.

Principals: If present, this part MUST specify the context identity in which the task is to be started. See section 2.5.6.

Actions: This part MUST be present and MUST specify the action to be performed once the task is started. See section 2.5.7.

Version: If present, this attribute MUST specify the lowest version of the Task Scheduler Remoting Protocol that will be compatible with this task. Its value MUST be one of the following: "1.0", "1.1", "1.2", "1.3", or "1.4", corresponding to ATSvc, SASec, and ITaskSchedulerService (for the last three), respectively (see section 1.7).

Show: