Spring定时任务

    <bean id="ScheduleAction" class="com.server.business.cms.ScheduleAction">          
        <property name="scheduler" ref="schedulerFactory"/>      
    </bean> 
     
    <bean id="ScheduleEngineFactory" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> 
        <property name="targetObject" ref="SchedulerEngine"/> 
        <property name="targetMethod"> 
             <value>run</value> 
        </property> 
        <property name="concurrent" value="false"/> 
    </bean> 
     
    <bean id="ScheduleActionTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">          
        <property name="jobDetail"> 
            <ref bean="ScheduleEngineFactory"></ref> 
        </property>     
        <property name="startDelay"> 
            <value>80000</value> 
        </property> 
        <property name="repeatInterval"> 
            <value>80000</value> 
        </property> 
    </bean> 
     
    <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">          
        <property name="triggers">              
            <list>             
                <ref bean="ScheduleActionTrigger"/>              
            </list>          
        </property> 
    </bean>

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