job_scheduling_data_2_0.xsd 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
  4. targetNamespace="http://quartznet.sourceforge.net/JobSchedulingData"
  5. elementFormDefault="qualified"
  6. version="2.0">
  7. <xs:element name="job-scheduling-data">
  8. <xs:annotation>
  9. <xs:documentation>Root level node</xs:documentation>
  10. </xs:annotation>
  11. <xs:complexType>
  12. <xs:sequence maxOccurs="unbounded">
  13. <xs:element name="pre-processing-commands" type="pre-processing-commandsType" minOccurs="0" maxOccurs="1">
  14. <xs:annotation>
  15. <xs:documentation>Commands to be executed before scheduling the jobs and triggers in this file.</xs:documentation>
  16. </xs:annotation>
  17. </xs:element>
  18. <xs:element name="processing-directives" type="processing-directivesType" minOccurs="0" maxOccurs="1">
  19. <xs:annotation>
  20. <xs:documentation>Directives to be followed while scheduling the jobs and triggers in this file.</xs:documentation>
  21. </xs:annotation>
  22. </xs:element>
  23. <xs:element name="schedule" minOccurs="0" maxOccurs="unbounded">
  24. <xs:complexType>
  25. <xs:sequence maxOccurs="unbounded">
  26. <xs:element name="job" type="job-detailType" minOccurs="0" maxOccurs="unbounded" />
  27. <xs:element name="trigger" type="triggerType" minOccurs="0" maxOccurs="unbounded" />
  28. </xs:sequence>
  29. </xs:complexType>
  30. </xs:element>
  31. </xs:sequence>
  32. <xs:attribute name="version" type="xs:string">
  33. <xs:annotation>
  34. <xs:documentation>Version of the XML Schema instance</xs:documentation>
  35. </xs:annotation>
  36. </xs:attribute>
  37. </xs:complexType>
  38. </xs:element>
  39. <xs:complexType name="pre-processing-commandsType">
  40. <xs:sequence maxOccurs="unbounded">
  41. <xs:element name="delete-jobs-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
  42. <xs:annotation>
  43. <xs:documentation>Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.</xs:documentation>
  44. </xs:annotation>
  45. </xs:element>
  46. <xs:element name="delete-triggers-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
  47. <xs:annotation>
  48. <xs:documentation>Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.</xs:documentation>
  49. </xs:annotation>
  50. </xs:element>
  51. <xs:element name="delete-job" minOccurs="0" maxOccurs="unbounded">
  52. <xs:annotation>
  53. <xs:documentation>Delete the identified job if it exists (will also result in deleting all triggers related to it).</xs:documentation>
  54. </xs:annotation>
  55. <xs:complexType>
  56. <xs:sequence>
  57. <xs:element name="name" type="xs:string" />
  58. <xs:element name="group" type="xs:string" minOccurs="0" />
  59. </xs:sequence>
  60. </xs:complexType>
  61. </xs:element>
  62. <xs:element name="delete-trigger" minOccurs="0" maxOccurs="unbounded">
  63. <xs:annotation>
  64. <xs:documentation>Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).</xs:documentation>
  65. </xs:annotation>
  66. <xs:complexType>
  67. <xs:sequence>
  68. <xs:element name="name" type="xs:string" />
  69. <xs:element name="group" type="xs:string" minOccurs="0" />
  70. </xs:sequence>
  71. </xs:complexType>
  72. </xs:element>
  73. </xs:sequence>
  74. </xs:complexType>
  75. <xs:complexType name="processing-directivesType">
  76. <xs:sequence>
  77. <xs:element name="overwrite-existing-data" type="xs:boolean" minOccurs="0" default="true">
  78. <xs:annotation>
  79. <xs:documentation>Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.</xs:documentation>
  80. </xs:annotation>
  81. </xs:element>
  82. <xs:element name="ignore-duplicates" type="xs:boolean" minOccurs="0" default="false">
  83. <xs:annotation>
  84. <xs:documentation>If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.</xs:documentation>
  85. </xs:annotation>
  86. </xs:element>
  87. <xs:element name="schedule-trigger-relative-to-replaced-trigger" type="xs:boolean" minOccurs="0" default="false">
  88. <xs:annotation>
  89. <xs:documentation>If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.</xs:documentation>
  90. </xs:annotation>
  91. </xs:element>
  92. </xs:sequence>
  93. </xs:complexType>
  94. <xs:complexType name="job-detailType">
  95. <xs:annotation>
  96. <xs:documentation>Define a JobDetail</xs:documentation>
  97. </xs:annotation>
  98. <xs:sequence>
  99. <xs:element name="name" type="xs:string" />
  100. <xs:element name="group" type="xs:string" minOccurs="0" />
  101. <xs:element name="description" type="xs:string" minOccurs="0" />
  102. <xs:element name="job-type" type="xs:string" />
  103. <xs:sequence minOccurs="0">
  104. <xs:element name="durable" type="xs:boolean" />
  105. <xs:element name="recover" type="xs:boolean" />
  106. </xs:sequence>
  107. <xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
  108. </xs:sequence>
  109. </xs:complexType>
  110. <xs:complexType name="job-data-mapType">
  111. <xs:annotation>
  112. <xs:documentation>Define a JobDataMap</xs:documentation>
  113. </xs:annotation>
  114. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  115. <xs:element name="entry" type="entryType" />
  116. </xs:sequence>
  117. </xs:complexType>
  118. <xs:complexType name="entryType">
  119. <xs:annotation>
  120. <xs:documentation>Define a JobDataMap entry</xs:documentation>
  121. </xs:annotation>
  122. <xs:sequence>
  123. <xs:element name="key" type="xs:string" />
  124. <xs:element name="value" type="xs:string" />
  125. </xs:sequence>
  126. </xs:complexType>
  127. <xs:complexType name="triggerType">
  128. <xs:annotation>
  129. <xs:documentation>Define a Trigger</xs:documentation>
  130. </xs:annotation>
  131. <xs:choice>
  132. <xs:element name="simple" type="simpleTriggerType" />
  133. <xs:element name="cron" type="cronTriggerType" />
  134. <xs:element name="calendar-interval" type="calendarIntervalTriggerType" />
  135. </xs:choice>
  136. </xs:complexType>
  137. <xs:complexType name="abstractTriggerType" abstract="true">
  138. <xs:annotation>
  139. <xs:documentation>Common Trigger definitions</xs:documentation>
  140. </xs:annotation>
  141. <xs:sequence>
  142. <xs:element name="name" type="xs:string" />
  143. <xs:element name="group" type="xs:string" minOccurs="0" />
  144. <xs:element name="description" type="xs:string" minOccurs="0" />
  145. <xs:element name="job-name" type="xs:string" />
  146. <xs:element name="job-group" type="xs:string" minOccurs="0" />
  147. <xs:element name="priority" type="xs:nonNegativeInteger" minOccurs="0" />
  148. <xs:element name="calendar-name" type="xs:string" minOccurs="0" />
  149. <xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
  150. <xs:sequence minOccurs="0">
  151. <xs:choice>
  152. <xs:element name="start-time" type="xs:dateTime" />
  153. <xs:element name="start-time-seconds-in-future" type="xs:nonNegativeInteger" />
  154. </xs:choice>
  155. <xs:element name="end-time" type="xs:dateTime" minOccurs="0" />
  156. </xs:sequence>
  157. </xs:sequence>
  158. </xs:complexType>
  159. <xs:complexType name="simpleTriggerType">
  160. <xs:annotation>
  161. <xs:documentation>Define a SimpleTrigger</xs:documentation>
  162. </xs:annotation>
  163. <xs:complexContent>
  164. <xs:extension base="abstractTriggerType">
  165. <xs:sequence>
  166. <xs:element name="misfire-instruction" type="simple-trigger-misfire-instructionType" minOccurs="0" />
  167. <xs:sequence minOccurs="0">
  168. <xs:element name="repeat-count" type="repeat-countType" />
  169. <xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
  170. </xs:sequence>
  171. </xs:sequence>
  172. </xs:extension>
  173. </xs:complexContent>
  174. </xs:complexType>
  175. <xs:complexType name="cronTriggerType">
  176. <xs:annotation>
  177. <xs:documentation>Define a CronTrigger</xs:documentation>
  178. </xs:annotation>
  179. <xs:complexContent>
  180. <xs:extension base="abstractTriggerType">
  181. <xs:sequence>
  182. <xs:element name="misfire-instruction" type="cron-trigger-misfire-instructionType" minOccurs="0" />
  183. <xs:element name="cron-expression" type="cron-expressionType" />
  184. <xs:element name="time-zone" type="xs:string" minOccurs="0" />
  185. </xs:sequence>
  186. </xs:extension>
  187. </xs:complexContent>
  188. </xs:complexType>
  189. <xs:complexType name="calendarIntervalTriggerType">
  190. <xs:annotation>
  191. <xs:documentation>Define a DateIntervalTrigger</xs:documentation>
  192. </xs:annotation>
  193. <xs:complexContent>
  194. <xs:extension base="abstractTriggerType">
  195. <xs:sequence>
  196. <xs:element name="misfire-instruction" type="date-interval-trigger-misfire-instructionType" minOccurs="0" />
  197. <xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
  198. <xs:element name="repeat-interval-unit" type="interval-unitType" />
  199. </xs:sequence>
  200. </xs:extension>
  201. </xs:complexContent>
  202. </xs:complexType>
  203. <xs:simpleType name="cron-expressionType">
  204. <xs:annotation>
  205. <xs:documentation>
  206. Cron expression (see JavaDoc for examples)
  207. Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
  208. Regular expressions are not my strong point but I believe this is complete,
  209. with the caveat that order for expressions like 3-0 is not legal but will pass,
  210. and month and day names must be capitalized.
  211. If you want to examine the correctness look for the [\s] to denote the
  212. seperation of individual regular expressions. This is how I break them up visually
  213. to examine them:
  214. SECONDS:
  215. (
  216. ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
  217. | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
  218. | ([\?])
  219. | ([\*])
  220. ) [\s]
  221. MINUTES:
  222. (
  223. ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
  224. | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
  225. | ([\?])
  226. | ([\*])
  227. ) [\s]
  228. HOURS:
  229. (
  230. ((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
  231. | (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
  232. | ([\?])
  233. | ([\*])
  234. ) [\s]
  235. DAY OF MONTH:
  236. (
  237. ((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
  238. | (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
  239. | (L(-[0-9])?)
  240. | (L(-[1-2][0-9])?)
  241. | (L(-[3][0-1])?)
  242. | (LW)
  243. | ([1-9]W)
  244. | ([1-3][0-9]W)
  245. | ([\?])
  246. | ([\*])
  247. )[\s]
  248. MONTH:
  249. (
  250. ((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
  251. | (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
  252. | (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
  253. | ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
  254. | ([\?])
  255. | ([\*])
  256. )[\s]
  257. DAY OF WEEK:
  258. (
  259. (([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
  260. | ([1-7]/([1-7]))
  261. | (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
  262. | ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
  263. | (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
  264. | (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
  265. | ([\?])
  266. | ([\*])
  267. )
  268. YEAR (OPTIONAL):
  269. (
  270. [\s]?
  271. ([\*])?
  272. | ((19[7-9][0-9])|(20[0-9][0-9]))?
  273. | (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
  274. | ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
  275. )
  276. </xs:documentation>
  277. </xs:annotation>
  278. <xs:restriction base="xs:string">
  279. <xs:pattern
  280. value="(((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)|(([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))|([\?])|([\*]))[\s](((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)|(([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)|(L(-[0-9])?)|(L(-[1-2][0-9])?)|(L(-[3][0-1])?)|(LW)|([1-9]W)|([1-3][0-9]W)|([\?])|([\*]))[\s](((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)|(([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))|(((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)|((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))|([\?])|([\*]))[\s]((([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)|([1-7]/([1-7]))|(((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)|((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)|(([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))?(L|LW)?)|(([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)|([\?])|([\*]))([\s]?(([\*])?|(19[7-9][0-9])|(20[0-9][0-9]))?| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?)" />
  281. </xs:restriction>
  282. </xs:simpleType>
  283. <xs:simpleType name="repeat-countType">
  284. <xs:annotation>
  285. <xs:documentation>Number of times to repeat the Trigger (-1 for indefinite)</xs:documentation>
  286. </xs:annotation>
  287. <xs:restriction base="xs:integer">
  288. <xs:minInclusive value="-1" />
  289. </xs:restriction>
  290. </xs:simpleType>
  291. <xs:simpleType name="simple-trigger-misfire-instructionType">
  292. <xs:annotation>
  293. <xs:documentation>Simple Trigger Misfire Instructions</xs:documentation>
  294. </xs:annotation>
  295. <xs:restriction base="xs:string">
  296. <xs:pattern value="SmartPolicy" />
  297. <xs:pattern value="RescheduleNextWithExistingCount" />
  298. <xs:pattern value="RescheduleNextWithRemainingCount" />
  299. <xs:pattern value="RescheduleNowWithExistingRepeatCount" />
  300. <xs:pattern value="RescheduleNowWithRemainingRepeatCount" />
  301. <xs:pattern value="FireNow" />
  302. <xs:pattern value="IgnoreMisfirePolicy" />
  303. </xs:restriction>
  304. </xs:simpleType>
  305. <xs:simpleType name="cron-trigger-misfire-instructionType">
  306. <xs:annotation>
  307. <xs:documentation>Cron Trigger Misfire Instructions</xs:documentation>
  308. </xs:annotation>
  309. <xs:restriction base="xs:string">
  310. <xs:pattern value="SmartPolicy" />
  311. <xs:pattern value="DoNothing" />
  312. <xs:pattern value="FireOnceNow" />
  313. <xs:pattern value="IgnoreMisfirePolicy" />
  314. </xs:restriction>
  315. </xs:simpleType>
  316. <xs:simpleType name="date-interval-trigger-misfire-instructionType">
  317. <xs:annotation>
  318. <xs:documentation>Date Interval Trigger Misfire Instructions</xs:documentation>
  319. </xs:annotation>
  320. <xs:restriction base="xs:string">
  321. <xs:pattern value="SmartPolicy" />
  322. <xs:pattern value="DoNothing" />
  323. <xs:pattern value="FireOnceNow" />
  324. <xs:pattern value="IgnoreMisfirePolicy" />
  325. </xs:restriction>
  326. </xs:simpleType>
  327. <xs:simpleType name="interval-unitType">
  328. <xs:annotation>
  329. <xs:documentation>Interval Units</xs:documentation>
  330. </xs:annotation>
  331. <xs:restriction base="xs:string">
  332. <xs:pattern value="Day" />
  333. <xs:pattern value="Hour" />
  334. <xs:pattern value="Minute" />
  335. <xs:pattern value="Month" />
  336. <xs:pattern value="Second" />
  337. <xs:pattern value="Week" />
  338. <xs:pattern value="Year" />
  339. </xs:restriction>
  340. </xs:simpleType>
  341. </xs:schema>