Quartz作业调度框架--XML配置
Quartz作业调度框架? --XML配置
?
applicationContext.xml 配置:
?
?
<!-- 定时服务配置开始 -->
<import resource="classpath:/config/spring/quartz_jobs.xml"/>
?
?
quartz_jobs.xml配置:
?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
?
?<!-- 要调用的工作类 -->
??<bean id="quartzJob" />
?????? </property>
???</bean>
?<!-- 定义调用对象和调用对象的方法 -->
???<bean id="jobtask"??????? lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
??????????? <property name="triggers">
??????????????? <list>
??????????????????? <ref bean="doTime"/>
?????????????????</list>
??????????? </property>
??????? </bean>???????
<!-- 2012-08-29 Quartz定时器 end -->
?
</beans>