spring-scheduler.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="successRateSchedule" class="com.cmsz.visualization.schedule.SocketIOSuccessRateSchedule"></bean>
<bean id="socketIOScheduleTodayTotalData" class="com.cmsz.visualization.schedule.SocketIOScheduleTodayTotalData" />
<bean id="indexMainMapSchedule" class="com.cmsz.visualization.schedule.SocketIOMainMapSchedule"></bean>
<!-- 缴费详情任务 -->
<bean id="tMallHourDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOTMallHourSchedule" />
<bean id="tMallMonthDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOTMallMonthSchedule" />
<bean id="tMallYearDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOTMallYearSchedule" />
<bean id="moveHourDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOMoveHourSchedule" />
<bean id="moveMonthDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOMoveMonthSchedule" />
<bean id="moveYearDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOMoveYearSchedule" />
<bean id="bankHourDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOBankHourSchedule" />
<bean id="bankMonthDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOBankMonthSchedule" />
<bean id="bankYearDetailSchedule" class="com.cmsz.visualization.schedule.SocketIOBankYearSchedule" />
<!-- 签解约近24小时 -->
<bean id="contractTerminaHourSchedule" class="com.cmsz.visualization.schedule.SocketIOContractTerminaHourSchedule" />
<!-- 签解约近一月 -->
<bean id="contractTerminaMonthSchedule" class="com.cmsz.visualization.schedule.SocketIOContractTerminaMonthSchedule"/>
<!-- 签解约近一年 -->
<bean id="contractTerminaYearSchedule" class="com.cmsz.visualization.schedule.SocketIOContractTerminaYearSchedule"/>
<!-- 签约交易量查询 -->
<bean id="contractMonthTotalSchedule" class="com.cmsz.visualization.schedule.SocketIOContractMonthTotalSchedule" />
<bean id="socketIOScheduleHealth" class="com.cmsz.visualization.schedule.SocketIOScheduleHealth"/>
<bean id="socketIOSchedulePerformance" class="com.cmsz.visualization.schedule.SocketIOSchedulePerformance" />
<!-- 定义目标bean和bean中的方法 -->
<bean id="successSocketioJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref local="successRateSchedule" />
</property>
<property name="targetMethod">
<!-- 要执行的方法名称 -->
<value>execute</value>
</property>
<!-- -->
<property name="concurrent" value="true" />
</bean>
<!--定义触发的时间 -->
<bean id="successSocketioCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="successSocketioJob" />
</property>
<!-- -->
<property name="cronExpression">
<value>0/3 * * * * ?</value>
</property>
</bean>
<!-- 管理触发器 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="successSocketioCron" />
<ref local="tradingVolumeTrigger" />
</list>
</property>
</bean>
<!-- 交易量任务 -->
<bean id="tradingVolumeSchedule"
class="com.cmsz.visualization.schedule.SocketIOTradingVolumeSchedule" />
<bean id="tradingVolumeScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="tradingVolumeSchedule" />
<property name="targetMethod" value="doTradingVolumeSchedule" />
<property name="concurrent" value="true" />
</bean>
<bean id="tradingVolumeTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="tradingVolumeScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0/3 * * * * ?</value>
</property>
</bean>
<!-- 天猫近24小时 -->
<bean id="tMallDayScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="tMallHourDetailSchedule" />
<property name="targetMethod" value="tMallDay" />
<property name="concurrent" value="true" />
</bean>
<bean id="tMallDayDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="tMallDayScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 1 0-23 * * ?</value>
</property>
</bean>
<!-- 天猫近一月 -->
<bean id="tMallMonthScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="tMallMonthDetailSchedule" />
<property name="targetMethod" value="tMallMonth" />
<property name="concurrent" value="true" />
</bean>
<bean id="tMallMonthDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="tMallMonthScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 */1 * ?</value>
</property>
</bean>
<!-- 天猫近一年 -->
<bean id="tMallYearScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="tMallYearDetailSchedule" />
<property name="targetMethod" value="tMallYear" />
<property name="concurrent" value="true" />
</bean>
<bean id="tMallYearDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="tMallYearScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 1 */1 ?</value>
</property>
</bean>
<!-- 移动商城近24小时 -->
<bean id="moveDayScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="moveHourDetailSchedule" />
<property name="targetMethod" value="moveDay" />
<property name="concurrent" value="true" />
</bean>
<bean id="moveDayDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="moveDayScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value> 0 1 0-23 * * ?</value>
</property>
</bean>
<!-- 移动商城近一月-->
<bean id="moveMonthScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="moveMonthDetailSchedule" />
<property name="targetMethod" value="moveMonth" />
<property name="concurrent" value="true" />
</bean>
<bean id="moveMonthDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="moveMonthScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 */1 * ?</value>
</property>
</bean>
<!-- 移动商城近一年 -->
<bean id="moveYearScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="moveYearDetailSchedule" />
<property name="targetMethod" value="moveYear" />
<property name="concurrent" value="true" />
</bean>
<bean id="moveYearDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="moveYearScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 1 */1 ?</value>
</property>
</bean>
<!-- 总对总近24小时 -->
<bean id="bankDayScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="bankHourDetailSchedule" />
<property name="targetMethod" value="bankDay" />
<property name="concurrent" value="true" />
</bean>
<bean id="bankDayDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="bankDayScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 1 0-23 * * ?</value>
</property>
</bean>
<!-- 总对总近一月 -->
<bean id="bankMonthScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="bankMonthDetailSchedule" />
<property name="targetMethod" value="bankMonth" />
<property name="concurrent" value="true" />
</bean>
<bean id="bankMonthDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="bankMonthScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 */1 * ?</value>
</property>
</bean>
<!-- 总对总近一年 -->
<bean id="bankYearScheduleDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="bankYearDetailSchedule" />
<property name="targetMethod" value="bankYear" />
<property name="concurrent" value="true" />
</bean>
<bean id="bankYearDetailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="bankYearScheduleDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0 0 0 1 */1 ?</value>
</property>
</bean>
<!-- 天猫近24小时 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="tMallDayDetailTrigger" />
</list>
</property>
</bean>
<!-- 天猫近一月 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="tMallMonthDetailTrigger" />
</list>
</property>
</bean>
<!-- 天猫近一年 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="tMallYearDetailTrigger" />
</list>
</property>
</bean>
<!--移动商城近24小时 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="moveDayDetailTrigger" />
</list>
</property>
</bean>
<!-- 移动商城近一月 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="moveMonthDetailTrigger" />
</list>
</property>
</bean>
<!-- 移动商城近一年 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="moveYearDetailTrigger" />
</list>
</property>
</bean>
<!-- 总对总近24小时 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="bankDayDetailTrigger" />
</list>
</property>
</bean>
<!-- 总对总近一月 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="bankMonthDetailTrigger" />
</list>
</property>
</bean>
<!-- 总对总近一年 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="bankYearDetailTrigger" />
</list>
</property>
</bean>
<!-- 今日充值总笔数与今日成交总金额定义目标bean和bean中的方法 -->
<bean id="socketioJobTodayTotalData"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref local="socketIOScheduleTodayTotalData" />
</property>
<property name="targetMethod">
<!-- 要执行的方法名称 -->
<value>execute</value>
</property>
<property name="concurrent" value="true" />
</bean>
<!--今日充值总笔数与今日成交总金额定义触发的时间 -->
<bean id="socketioCronTodayTotalData" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="socketioJobTodayTotalData" />
</property>
<property name="cronExpression">
<value>0/1 * * * * ?</value>
</property>
</bean>
<!-- 今日充值总笔数与今日成交总金额管理触发器 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="socketioCronTodayTotalData" />
</list>
</property>
</bean>
<!-- 跌代二 运营分析定时器 -->
<bean id="operationTotalPushSchedule"
class="com.cmsz.visualization.schedule.SocketIOTradeDataTotalSchedule"></bean>
<!-- 定义目标bean和bean中的方法 -->
<bean id="operationTotalPushSocketioJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref local="operationTotalPushSchedule" />
</property>
<property name="targetMethod">
<!-- 要执行的方法名称 -->
<value>operationTotalPush</value>
</property>
<!-- <property name="concurrent" value="true" /> -->
</bean>
<!--定义触发的时间 -->
<bean id="operationTotalPushSocketioCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="operationTotalPushSocketioJob" />
</property>
<property name="cronExpression">
<value>5 0 0-23 * * ?</value>
</property>
</bean>
<!-- 管理触发器 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="operationTotalPushSocketioCron" />
</list>
</property>
</bean>
<!--迭代三首页健康度 -->
<!--健康度定义目标bean和bean中的方法 -->
<bean id="socketioJobHealth" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject"> <ref local="socketIOScheduleHealth" /> </property>
<property name="targetMethod">
<!-- 要执行的方法名称 -->
<value>execute</value>
</property>
<property name="concurrent" value="true" />
</bean>
<!--健康度定义触发的时间 -->
<bean id="socketioCronHealth" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="socketioJobHealth" />
</property>
<property name="cronExpression">
<value>0/5 * * * * ?</value>
</property>
</bean>
<!--健康度管理触发器 -->
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list> <ref local="socketioCronHealth" /> </list>
</property>
</bean>
<!--迭代三首页性能指标 -->
<!--性能指标定义目标bean和bean中的方法 -->
<bean id="socketioJobPerformance"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref local="socketIOSchedulePerformance" />
</property>
<property name="targetMethod">
<value>execute</value>
</property>
<property name="concurrent" value="true" />
</bean>
<!--性能指标定义触发的时间 -->
<bean id="socketioCronPerformance" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="socketioJobPerformance" />
</property>
<property name="cronExpression">
<value>0/5 * * * * ?</value>
</property>
</bean>
<!--性能指标管理触发器 -->
<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="socketioCronPerformance" />
</list>
</property>
</bean>
<!-- indexMainMap定义目标bean和bean中的方法 -->
<bean id="indexMainMapSocketioJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="indexMainMapSchedule" />
<property name="targetMethod" value="mainMapPush" />
<property name="concurrent" value="true" />
</bean>
<!-- indexMainMap定义触发的时间 -->
<bean id="indexMainMapSocketioCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="indexMainMapSocketioJob" />
<property name="cronExpression">
<value>0/5 * * * * ?</value>
</property>
</bean>
<!-- indexMainMap管理触发器 -->
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="indexMainMapSocketioCron" />
</list>
</property>
</bean>
<!-- 签解约近24小时 -->
<bean id="contractTerminaHourJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="contractTerminaHourSchedule" />
<property name="targetMethod" value="execute" />
<property name="concurrent" value="true" />
</bean>
<bean id="contractTerminaHourCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="contractTerminaHourJob" />
<property name="cronExpression">
<!-- 秒,分,小时,天,月 -->
<value>0 1 0-23 * * ?</value>
</property>
</bean>
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="contractTerminaHourCron" />
</list>
</property>
</bean>
<!-- 签解约近一月 -->
<bean id="contractTerminaMonthJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="contractTerminaMonthSchedule" />
<property name="targetMethod" value="execute" />
<property name="concurrent" value="true" />
</bean>
<bean id="contractTerminaMonthCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="contractTerminaMonthJob" />
<property name="cronExpression">
<value>0 0 0 */1 * ?</value>
</property>
</bean>
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="contractTerminaMonthCron"/>
</list>
</property>
</bean>
<!-- 签解约近一年 -->
<bean id="contractTerminaYearJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="contractTerminaYearSchedule"></property>
<property name="targetMethod" value="execute"></property>
<property name="concurrent" value="true" />
</bean>
<bean id="contractTerminaYearCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="contractTerminaYearJob" />
<property name="cronExpression">
<value>0 1 0 1 */1 ?</value>
<!-- <value>0/10 * * * * ?</value> -->
</property>
</bean>
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="contractTerminaYearCron"/>
</list>
</property>
</bean>
<bean id="contractTotalMonthJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="contractMonthTotalSchedule" />
<property name="targetMethod" value="execute" />
<property name="concurrent" value="true" />
</bean>
<bean id="contractTotalMonthCron" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="contractTotalMonthJob" />
<property name="cronExpression">
<!-- 秒,分,小时,天,月 -->
<value>0 0 0 */1 * ?</value>
<!-- <value>0/3 * * * * ?</value>-->
</property>
</bean>
<bean autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="contractTotalMonthCron" />
</list>
</property>
</bean>
</beans>