Spring4+quertz2定时调度

quertz2.17
这是其中一种方法,可以设置具体的更新时间


   <bean id="jobBean" class="com.gdpay.action.CreateDayreport" /> 

   <bean id="jobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="jobBean" />
        <property name="targetMethod" value="execute" />
        
        <property name="concurrent" value="false" />
   bean>

 
    <bean id="trigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
        <property name="jobDetail" ref="jobDetail" />
        
        <property name="cronExpression" value="0/5 * * * * ?" />
    bean>

 
    
    <bean id="startQuertz" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false" >
        <property name="triggers">
            <list>
                
                <ref bean="trigger" />
            list>
        property>
    bean>

附一个简单的参考地址http://www.cnblogs.com/yhtboke/p/5806501.html

你可能感兴趣的:(SSH相关)