2.5.3.1 Common Trigger Elements

This section specifies the elements that are common to all triggers. For the clarity of the document, these will be specified once in this section, but each and every trigger specified in the following sections contains these common elements. The following sections specify only added elements beyond the ones specified in this section.

 <!-- Base type for all triggers -->
 <xs:complexType name="triggerBaseType" abstract="true">
   <xs:sequence>
     <xs:element name="Enabled" type="xs:boolean" default="true" 
     minOccurs="0"/>
     <xs:element name="StartBoundary" type="xs:dateTime" 
     minOccurs="0"/>
     <xs:element name="EndBoundary" 
         type="xs:dateTime" minOccurs="0"/>
     <xs:element name="Repetition" type="repetitionType" 
     minOccurs="0"/>
     <xs:element name="ExecutionTimeLimit" type="xs:duration" 
     minOccurs="0"/>
   </xs:sequence>
   <xs:attribute name="id" type="xs:ID" use="optional"/>
 </xs:complexType>
 <!-- Repetition -->
 <xs:complexType name="repetitionType">
   <xs:all>
     <xs:element name="Interval">
       <xs:simpleType>
         <xs:restriction base= "xs:duration">
           <xs:minInclusive value="PT1M"/>
           <xs:maxInclusive value="P31D"/>
         </xs:restriction>
       </xs:simpleType>
     </xs:element>
     <xs:element name= "Duration" minOccurs= "0">
       <xs:simpleType>
         <xs:restriction base= "xs:duration">
           <xs:minInclusive value= "PT1M "/>
         </xs:restriction>
       </xs:simpleType>
     </xs:element>
     <xs:element name= "StopAtDurationEnd" type= "xs:boolean" 
     default= "false " minOccurs= "0"/>
   </xs:all>
 </xs:complexType>

Id attribute: If present, this field specifies an identifier for the specific trigger type Id, allowing direct reference.

StartBoundary: If present, this field contains a time/date value of the start time/date of a task. The format is as specified in section 2.5.1.1. This field is present for Time and Calendar triggers.

EndBoundary: If present, this field contains a time/date value of the end time/date of a task. The format is as specified in section 2.5.1.1.

Enabled: If present, this field contains a Boolean value. If the field is not present or the value is TRUE, the trigger is enabled and the task can start when this trigger occurs. If FALSE, the trigger is disabled and the trigger can be ignored when determining whether to run the task.

ExecutionTimeLimit: If present, this field contains a time duration that is a limit of the task's execution time. The format MUST be as specified in section 2.5.1.1.

Repetition: If present, the Repetition field contains 1 to 3 of the following subfields, including at least the Interval subfield.

Interval: This subfield is present and contains a duration of time in the range from 1 minute to 31 days, inclusive. The format is as specified in section 2.5.1.1. If the task starts at the time specified by the trigger, it can restart at the intervals specified by this field, calculated from the trigger start time.

Duration: If present, the Duration subfield contains a duration no shorter than 1 minute. The format is as specified in section 2.5.1.1. The server can stop restarting the task after this much time has elapsed from the task's trigger time. If not present, the Duration value of 1 day can be used for the task.

StopAtDurationEnd: If present, this subfield contains a Boolean value. If the field has the value TRUE, any running task instance can stop at the end of the Duration. If the field has the value FALSE, task instances can continue running after the end of the Duration.