2.5.3.9 CalendarTrigger

If present, the CalendarTrigger specifies that the task can start on the specified days.

 <!-- CalendarTrigger -->
 <xs:complexType name="calendarTriggerType">
   <xs:complexContent>
     <xs:extension base="triggerBaseType">
       <xs:sequence>
         <xs:element name="RandomDelay" type="xs:duration" 
         default="PT0M" minOccurs="0"/>
         <xs:choice>
             <xs:element name="ScheduleByDay" 
             type="dailyScheduleType"/>
             <xs:element name="ScheduleByWeek" 
             type="weeklyScheduleType"/>
             <xs:element name="ScheduleByMonth" 
             type="monthlyScheduleType"/>
             <xs:element name="ScheduleByMonthDayOfWeek" 
             type="monthlyDayOfWeekScheduleType"/>
         </xs:choice>
       </xs:sequence>
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>
 <!-- DailySchedule -->
 <xs:complexType name="dailyScheduleType">
   <xs:all>
     <xs:element name="DaysInterval" minOccurs="0">
       <xs:simpleType>
         <xs:restriction base="xs:unsignedInt">
           <xs:minInclusive value="1"/>
           <xs:maxInclusive value="365"/>
         </xs:restriction>
       </xs:simpleType>
     </xs:element>
  </xs:all>
 </xs:complexType>
 <!-- WeeklySchedule -->
 <xs:complexType name="weeklyScheduleType">
   <xs:all>
     <xs:element name="WeeksInterval" minOccurs="0">
       <xs:simpleType>
         <xs:restriction base="xs:unsignedByte">
           <xs:minInclusive value="1"/>
           <xs:maxInclusive value="52"/>
         </xs:restriction>
       </xs:simpleType>
     </xs:element>
     <xs:element name="DaysOfWeek" type="daysOfWeekType" 
      minOccurs="0"/>
   </xs:all>
  </xs:complexType>
 <!-- MonthlySchedule -->
 <xs:complexType name="monthlyScheduleType">
   <xs:all>
     <xs:element name="DaysOfMonth" type="daysOfMonthType" 
     minOccurs="0"/>
     <xs:element name="Months" type="monthsType" minOccurs="0"/>
   </xs:all>
 </xs:complexType>
 <!-- MonthlyDayOfWeekSchedule -->
 <xs:complexType name="monthlyDayOfWeekScheduleType">
   <xs:all>
     <xs:element name="Weeks" type="weeksType" minOccurs="0"/>
     <xs:element name="DaysOfWeek" type="daysOfWeekType"/>
     <xs:element name="Months" type="monthsType" minOccurs="0"/>
   </xs:all>
 </xs:complexType>
 <!-- DaysOfWeek -->
 <xs:complexType name="daysOfWeekType">
   <xs:all>
     <xs:element name="Monday" fixed="" minOccurs="0"/>
     <xs:element name="Tuesday" fixed="" minOccurs="0"/>
     <xs:element name="Wednesday" fixed="" minOccurs="0"/>
     <xs:element name="Thursday" fixed="" minOccurs="0"/>
     <xs:element name="Friday" fixed="" minOccurs="0"/>
     <xs:element name="Saturday" fixed="" minOccurs="0"/>
     <xs:element name="Sunday" fixed="" minOccurs="0"/>
   </xs:all>
 </xs:complexType>
 <!-- Months -->
 <xs:complexType name="monthsType">
   <xs:all>
     <xs:element name="January" fixed="" minOccurs="0"/>
     <xs:element name="February" fixed="" minOccurs="0"/>
     <xs:element name="March" fixed="" minOccurs="0"/>
     <xs:element name="April" fixed="" minOccurs="0"/>
     <xs:element name="May" fixed="" minOccurs="0"/>
     <xs:element name="June" fixed="" minOccurs="0"/>
     <xs:element name="July" fixed="" minOccurs="0"/>
     <xs:element name="August" fixed="" minOccurs="0"/>
     <xs:element name="September" fixed="" minOccurs="0"/>
     <xs:element name="October" fixed="" minOccurs="0"/>
     <xs:element name="November" fixed="" minOccurs="0"/>
     <xs:element name="December" fixed="" minOccurs="0"/>
   </xs:all>
 </xs:complexType>
 <!-- DaysOfMonth -->
 <xs:complexType name="daysOfMonthType">
   <xs:sequence>
     <xs:element name="Day" type="dayOfMonthType" minOccurs="0"
     maxOccurs="32"/>
   </xs:sequence>
 </xs:complexType>
 <xs:simpleType name="dayOfMonthType">
   <xs:restriction base="xs:string">
     <xs:pattern value="[1-9]|[1-2][0-9]|3[0-1]|Last"/>
   </xs:restriction>
 </xs:simpleType>
 <!-- Weeks -->
 <xs:complexType name="weeksType">
   <xs:sequence>
     <xs:element name="Week" type="weekType" minOccurs="0" 
     maxOccurs="5"/>
   </xs:sequence>
 </xs:complexType>
 <xs:simpleType name="weekType">
   <xs:restriction base="xs:string">
     <xs:pattern value="[1-4]|Last"/>
   </xs:restriction>
 </xs:simpleType>

The CalendarTrigger field has exactly one of the following subfields: ScheduleByDay, ScheduleByWeek, ScheduleByMonth, or ScheduleByMonthDayOfWeek.

ScheduleByDay: If present, this field specifies that the task can run every day or every X number of days as specified by the DaysInterval subfield.

DaysInterval: If present, this field contains a value between 1 and 365, inclusive. The task runs every DaysInterval days (for example, a DaysInterval value of 2 means every other day).

ScheduleByWeek: If present, this field specifies that the task can run every week or every X number of weeks as specified by the WeeksInterval subfield, on specific days of the week as specified by the DaysOfWeek subfield.

WeeksInterval: If present, this field contains a value between 1 and 52, inclusive. The task runs every WeeksInterval weeks (for example, a WeeksInterval value of 2 means every other week).

DaysOfWeek: If present, this field contains zero or more of the following seven subfields: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. The task runs on the specified days of the week.

ScheduleByMonth: If present, this field specifies that the task can run on the days specified by the DaysOfMonth subfield, on specific months as specified by the Months subfield.

DaysOfMonth: If present, this field contains zero or more Day subfields, where each Day subfield contains a value between 1 and 31 inclusive, or the value "Last". The task runs on the specified days of the month for each Day subfield containing a value between 1 and 31 inclusive. The task also runs on the last day of the month if any Day subfield contains the value "Last".

Months: If present, this field contains zero or more of the following twelve subfields: January, February, March, April, May, June, July, August, September, October, November, December. The task runs on the specified months.

ScheduleByMonthDayOfWeek: If present, this field specifies that the task can run on the weeks specified by the Weeks subfield, on specific days of the week as specified by the DaysOfWeek subfield, on specific months as specified by the Months subfield.

Weeks: If present, this field contains zero or more Week subfields, where each Week subfield contains one of the following five values: 1, 2, 3, 4, or Last. The task runs on the specified weeks of the month.

DaysOfWeek: If present, this field contains zero or more of the following seven subfields: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. The task runs on the specified days of the week.

Months: If present, this field contains zero or more of the following twelve subfields: January, February, March, April, May, June, July, August, September, October, November, December. The task runs on the specified months.

RandomDelay: If present, this field contains a user-specified maximum delay value as specified for "time duration" in section 2.5.1.1. The random delay value MUST be chosen from the interval from zero to RandomDelay, inclusive. The task runs after the random delay interval has passed.