- <span style="font-size:16px"></span><h3><span style="font-family:宋体,arial,sans-serif;font-size:14px;line-height:25px"><span class="link_title"><span style="font-size:24px;color:#FF0000;"><a target="_blank" href="http://blog.csdn.net/xh16319/article/details/16356913">IT程序员开发必备-各类资源下载清单</a></span></span><span style="font-size:24px;color:#FF0000;"><a target="_blank" href="http://blog.csdn.net/xh16319/article/details/16356913">,史上最全IT资源,个人收藏总结!</a></span></span></h3><p>
- </p><?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
- default-autowire="byName" default-lazy-init="false">
- <!-- 总管理类 如果将lazy-init='false'那么容器启动就会执行调度程序 -->
- <bean id="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
- <property name="triggers">
- <list>
- <ref bean="dcsFlightDownTime"/>
- <ref bean="dcsPassengerDownTime"/>
- <ref bean="icsFlightDownTime"/>
- </list>
- </property>
- </bean>
- <!-- ********定时器1 ******** -->
- <!-- 定义调用对象和调用对象的方法 -->
- <bean id="dcsFlightDownJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <!-- 调用的类 -->
- <property name="targetObject" ref="DCSFlightDownTimer"></property>
- <!-- 调用类中的方法 -->
- <property name="targetMethod" value="work"></property>
- </bean>
- <!-- 定义触发时间 -->
- <bean id="dcsFlightDownTime" class="org.springframework.scheduling.quartz.CronTriggerBean">
- <property name="jobDetail" ref="dcsFlightDownJob"></property>
- <!-- cron表达式 每天00:00开始,2小时执行一次-->
- <property name="cronExpression">
- <value>0 0 0/2 * * ?</value>
- </property>
- </bean>
- <!-- ********定时器2 ******** -->
- <!-- 定义调用对象和调用对象的方法 -->
- <bean id="dcsPassengerDownJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <!-- 调用的类 -->
- <property name="targetObject" ref="DCSPassengerDownTimer"></property>
- <!-- 调用类中的方法 -->
- <property name="targetMethod" value="work"></property>
- </bean>
- <!-- 定义触发时间 -->
- <bean id="dcsPassengerDownTime" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
- <property name="jobDetail" ref="dcsPassengerDownJob"></property>
- <!-- 延迟30秒后,每隔35分钟执行一次 -->
- <property name="startDelay" value="60000"></property>
- <property name="repeatInterval" value="2100000"></property>
- </bean>
- <!-- ********定时器3 ******** -->
- <!-- 定义调用对象和调用对象的方法 -->
- <bean id="icsFlightDownJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <!-- 调用的类 -->
- <property name="targetObject" ref="ICSFlightDownTimer"></property>
- <!-- 调用类中的方法 -->
- <property name="targetMethod" value="work"></property>
- </bean>
- <!-- 定义触发时间 -->
- <bean id="icsFlightDownTime" class="org.springframework.scheduling.quartz.CronTriggerBean">
- <property name="jobDetail" ref="icsFlightDownJob"></property>
- <!-- cron表达式 每天的15点开始执行 -->
- <property name="cronExpression">
- <value>0 0 15 * * ?</value>
- </property>
- </bean>
- </beans>