Spring--quartz 结合

	
<bean id="sendMessageTimetask" class="com.taobao.keno.biz.core.timetask.impl.SendMessageTimetask" />
	
	<bean id="sendOrderMessage" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
		<property name="targetObject"><ref bean="sendMessageTimetask"/></property>
		<property name="targetMethod"><value>sendOrderMessage</value></property>
	</bean>
	
    <bean id="sendOrderMessageTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
		<property name="jobDetail"><ref bean="cronOrderMessage"/></property>
		<property name="cronExpression"><value>*/25 * * * * ?</value></property>
	</bean>
	
    <bean id="messageScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="triggers">
			<list>						
				<ref local="sendOrderMessageTrigger"/>
				<ref local="cronUnFreezeBailTrigger"/>
			</list>
		</property>
		<property name="autoStartup"><value>false</value></property>
		<property name="schedulerName"><value>messageScheduler</value></property>
	</bean>

你可能感兴趣的:(spring,xml,quartz)