quartz简单定时触发器


<beans>
<!-- Job Invoke detail bean -->
<bean id="jobDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="sysWarnScanImpl"></property>
         <!-- 定时调度方法 -->
<property name="targetMethod">
<value>generateWarnData</value>
</property>
</bean>
<bean id="sysTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="jobDetail" />
</property>
<property name="startDelay">
<!-- 1 seconds -->
<value>10000</value>
</property>
<property name="repeatInterval">
<!-- repeat every 60 seconds -->
<value>60000</value>
</property>
</bean>
<!-- main trigger -->
<bean
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="sysTrigger" />
</list>
</property>
</bean>
</beans>

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