<?xml version="1.0" encoding="UTF-8"?>
<quartz xmlns="http://www.opensymphony.com/quartz/JobSchedulingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opensymphony.com/quartz/JobSchedulingData
http://www.opensymphony.com/quartz/JobSchedulingData ">
<job>
<job-detail>
<name>scanDirectory</name>
<group>DEFAULT</group>
<description>此作业的功能是去扫描指定目录下的xml文件,输出所有xml文件的相关信息.</description>
<job-class>com.cavaness.quartzbook.chapter3.ScanDirectoryJob</job-class>
<volatility>false</volatility>
<durability>false</durability>
<recover>false</recover>
<job-data-map allows-transient-data="true">
<entry>
<key>SCAN_DIRECTORY</key>
<value>G:\\JavaEE\\Data\\Web Services</value>
</entry>
</job-data-map>
</job-detail>
<trigger>
<simple>
<name>scanDirectoryTrigger</name>
<group>DEFAULT</group>
<job-name>scanDirectory</job-name><!-- 把Job和Trigger关联在一块 -->
<job-group>DEFAULT</job-group>
<start-time>2012-08-02T16:14:30</start-time><!-- 如果设置时间早于当前时间,不确定时间开始 -->
<repeat-count>-1</repeat-count><!-- 设置为-1,表示重复无数次 -->
<repeat-interval>1000</repeat-interval><!-- 单位毫秒 -->
</simple>
</trigger>
</job>
</quartz>
8.quartz_jobs.xml 位于classpath下
最新推荐文章于 2021-11-19 16:11:45 发布