<嘉>spring定时器的XML设置,quartz;

<?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="buySuccessJob"
  class="com.ibm.app.happywork.component.garden.quartz.BuySuccessJob">
  <property name="gardenBuyRecordService" ref="gardenBuyRecordService" />
</bean>
<bean id="buySuccessJobDetail"
  class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
  <property name="targetObject">
   <ref bean="buySuccessJob" />
  </property>
  <property name="targetMethod">
   <value>execute</value>
  </property>
</bean>
<bean id="buySuccessTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
  <property name="jobDetail">
   <ref bean="buySuccessJobDetail" />
  </property>
  <property name="cronExpression">
   <value>00 00 17 * * ?</value>
  </property>
</bean>

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
  <property name="triggers">
   <list>
    <ref local="buySuccessTrigger" />
   </list>
  </property>
</bean>


</beans>

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