1<?xml version="1.0" encoding="UTF-8"?>
  2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  3  <xs:import namespace="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="xsi.xsd"/>
  4  <xs:element name="schedule">
  5    <xs:complexType>
  6      <xs:choice minOccurs="0" maxOccurs="unbounded">
  7        <xs:element ref="description"/>
  8        <xs:element ref="enabled"/>
  9        <xs:element ref="trigger"/>
 10        <xs:element ref="response"/>
 11      </xs:choice>
 12      <xs:attribute ref="xsi:noNamespaceSchemaLocation"/>
 13    </xs:complexType>
 14  </xs:element>
 15  <xs:element name="description" type="xs:string">
 16    <xs:annotation>
 17      <xs:documentation>Describe the purpose of this configuration file</xs:documentation>
 18    </xs:annotation>
 19  </xs:element>
 20  <xs:element name="enabled" type="xs:boolean"/>
 21  <xs:element name="trigger">
 22    <xs:annotation>
 23      <xs:documentation>Set up the conditions to create a job or jobs</xs:documentation>
 24    </xs:annotation>
 25    <xs:complexType>
 26      <xs:choice>
 27        <xs:element ref="hourly"/>
 28        <xs:element ref="daily"/>
 29        <xs:element ref="weekly"/>
 30        <xs:element ref="monthly"/>
 31        <xs:element ref="directory-monitor"/>
 32      </xs:choice>
 33    </xs:complexType>
 34  </xs:element>
 35  <xs:element name="hourly">
 36    <xs:annotation>
 37      <xs:documentation>Time based hourly trigger</xs:documentation>
 38    </xs:annotation>
 39    <xs:complexType>
 40      <xs:sequence>
 41        <xs:element minOccurs="0" ref="minute"/>
 42      </xs:sequence>
 43    </xs:complexType>
 44  </xs:element>
 45  <xs:element name="minute">
 46    <xs:simpleType>
 47      <xs:restriction base="xs:unsignedInt">
 48        <xs:maxInclusive value="59"/>
 49      </xs:restriction>
 50    </xs:simpleType>
 51  </xs:element>
 52  <xs:element name="daily">
 53    <xs:annotation>
 54      <xs:documentation>Time based trigger at the same time every day</xs:documentation>
 55    </xs:annotation>
 56    <xs:complexType>
 57      <xs:all>
 58        <xs:element name="hour">
 59          <xs:simpleType>
 60            <xs:restriction base="xs:unsignedInt">
 61              <xs:maxInclusive value="23"/>
 62            </xs:restriction>
 63          </xs:simpleType>
 64        </xs:element>
 65        <xs:element minOccurs="0" ref="duration"/>
 66        <xs:element minOccurs="0" ref="offset"/>
 67      </xs:all>
 68    </xs:complexType>
 69  </xs:element>
 70  <xs:element name="duration" type="xs:duration"/>
 71  <xs:element name="offset" type="xs:duration"/>
 72  <xs:element name="weekly">
 73    <xs:annotation>
 74      <xs:documentation>Time based trigger at the same day and time each week</xs:documentation>
 75    </xs:annotation>
 76    <xs:complexType>
 77      <xs:all>
 78        <xs:element name="day">
 79          <xs:simpleType>
 80            <xs:restriction base="xs:token">
 81              <xs:enumeration value="Monday"/>
 82              <xs:enumeration value="Tuesday"/>
 83              <xs:enumeration value="Wednesday"/>
 84              <xs:enumeration value="Thursday"/>
 85              <xs:enumeration value="Friday"/>
 86              <xs:enumeration value="Saturday"/>
 87              <xs:enumeration value="Sunday"/>
 88            </xs:restriction>
 89          </xs:simpleType>
 90        </xs:element>
 91        <xs:element name="hour">
 92          <xs:simpleType>
 93            <xs:restriction base="xs:unsignedInt">
 94              <xs:maxInclusive value="23"/>
 95            </xs:restriction>
 96          </xs:simpleType>
 97        </xs:element>
 98        <xs:element minOccurs="0" ref="offset"/>
 99      </xs:all>
100    </xs:complexType>
101  </xs:element>
102  <xs:element name="monthly">
103    <xs:annotation>
104      <xs:documentation>Time based monthly trigger</xs:documentation>
105    </xs:annotation>
106    <xs:complexType>
107      <xs:all>
108        <xs:element name="day">
109          <xs:simpleType>
110            <xs:restriction base="xs:unsignedInt">
111              <xs:minInclusive value="1"/>
112              <xs:maxInclusive value="31"/>
113            </xs:restriction>
114          </xs:simpleType>
115        </xs:element>
116        <xs:element name="hour">
117          <xs:simpleType>
118            <xs:restriction base="xs:unsignedInt">
119              <xs:minInclusive value="0"/>
120              <xs:maxInclusive value="23"/>
121            </xs:restriction>
122          </xs:simpleType>
123        </xs:element>
124        <xs:element ref="offset"/>
125      </xs:all>
126    </xs:complexType>
127  </xs:element>
128  <xs:element name="directory-monitor">
129    <xs:annotation>
130      <xs:documentation>Directory monitor</xs:documentation>
131    </xs:annotation>
132    <xs:complexType>
133      <xs:all>
134        <xs:element ref="directory"/>
135        <xs:element ref="pattern"/>
136        <xs:element minOccurs="0" ref="pdu-delay-queue"/>
137        <xs:element minOccurs="0" ref="timeout"/>
138        <xs:element minOccurs="0" ref="parser"/>
139      </xs:all>
140    </xs:complexType>
141  </xs:element>
142  <xs:element name="directory" type="xs:string"/>
143  <xs:element name="pattern" type="xs:string"/>
144  <xs:element name="pdu-delay-queue" type="xs:unsignedInt"/>
145  <xs:element name="timeout" type="xs:duration"/>
146  <xs:element name="parser" type="xs:string"/>
147  <xs:element name="response">
148    <xs:annotation>
149      <xs:documentation>What should we do when a trigger is met?</xs:documentation>
150    </xs:annotation>
151    <xs:complexType>
152      <xs:choice minOccurs="0" maxOccurs="unbounded">
153        <xs:element ref="sid"/>
154        <xs:element ref="scid"/>
155        <xs:element ref="gsid"/>
156        <xs:element ref="cfid"/>
157        <xs:element ref="ogsid"/>
158        <xs:element ref="activity"/>
159      </xs:choice>
160    </xs:complexType>
161  </xs:element>
162  <xs:element name="sid" type="xs:string"/>
163  <xs:element name="scid" type="xs:string"/>
164  <xs:element name="gsid" type="xs:string"/>
165  <xs:element name="cfid" type="xs:string"/>
166  <xs:element name="ogsid" type="xs:string"/>
167  <xs:element name="activity">
168    <xs:complexType mixed="true">
169      <xs:sequence>
170        <xs:element minOccurs="0" ref="scids"/>
171      </xs:sequence>
172    </xs:complexType>
173  </xs:element>
174  <xs:element name="scids" type="xs:string"/>
175</xs:schema>