quartz_jobs.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- This file contains job definitions in schema version 2.0 format -->
  3. <job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
  4. <processing-directives>
  5. <overwrite-existing-data>true</overwrite-existing-data>
  6. </processing-directives>
  7. <schedule>
  8. <!--定义示例任务1 Job-->
  9. <job>
  10. <name>DemoJob1</name>
  11. <group>DeomJobGroup</group>
  12. <description>示例任务1</description>
  13. <job-type>TimeSchedule.testjob1,TimeSchedule</job-type>
  14. <durable>true</durable>
  15. <recover>false</recover>
  16. </job>
  17. <!--定义示例任务2 Job-->
  18. <job>
  19. <name>DemoJob2</name>
  20. <group>DeomJobGroup</group>
  21. <description>示例任务2</description>
  22. <job-type>TimeSchedule.testjob2,TimeSchedule</job-type>
  23. <durable>true</durable>
  24. <recover>false</recover>
  25. </job>
  26. <!--定义示例任务1 触发器 每30秒执行一次DemoJob1任务-->
  27. <trigger>
  28. <cron>
  29. <name>DemoJob1Trigger</name>
  30. <group>DeomJobTriggerGroup</group>
  31. <job-name>DemoJob1</job-name>
  32. <job-group>DeomJobGroup</job-group>
  33. <cron-expression>3 * * * * * ?</cron-expression>
  34. </cron>
  35. </trigger>
  36. <!--定义示例任务2 触发器 每分钟执行一次DemoJob2任务-->
  37. <trigger>
  38. <cron>
  39. <name>DemoJob2Trigger1</name>
  40. <group>DeomJobTriggerGroup</group>
  41. <job-name>DemoJob2</job-name>
  42. <job-group>DeomJobGroup</job-group>
  43. <cron-expression>5 * * * * * ?</cron-expression>
  44. </cron>
  45. </trigger>
  46. <!--定义示例任务2 触发器 每天凌晨01:00执行一次DemoJob2任务-->
  47. <trigger>
  48. <cron>
  49. <name>DemoJob2Trigger2</name>
  50. <group>DeomJobTriggerGroup</group>
  51. <job-name>DemoJob2</job-name>
  52. <job-group>DeomJobGroup</job-group>
  53. <cron-expression>0 0 1 * * ?</cron-expression>
  54. </cron>
  55. </trigger>
  56. </schedule>
  57. </job-scheduling-data>