<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 s ...
- <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>