123456789101112131415161718192021222324252627282930313233343536 |
- <?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:aop="http://www.springframework.org/schema/aop"
- 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.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
- <!-- 定时任务 -->
- <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
- <property name="triggers">
- <list>
- <ref bean="dueTimeSubInfoSendMsg" />
- </list>
- </property>
- <property name="autoStartup" value="true" />
- </bean>
- <!-- 发送短信定时服务 satrt -->
- <bean id="dueTimeSubInfoSendMsg"
- class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
- <property name="jobDetail" ref="scheduleSendMsgJobDetail" />
- <!-- 调试一分钟启动一次 -->
- <property name="cronExpression" value="0 */30 * * * ?" />
- <!-- 每天23:55启动一次 -->
- <!-- <property name="cronExpression" value="0 55 23 * * ?" /> -->
- </bean>
- <bean id="dueTimeSubInfoSendMsgService" class="com.rtrh.projects.webservice.DueTimeSubInfoSendMsgService" />
- <bean id="scheduleSendMsgJobDetail"
- class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <property name="targetObject" ref="dueTimeSubInfoSendMsgService" />
- <property name="targetMethod" value="sendMsg" />
- <property name="concurrent" value="false" />
- <!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
- </bean>
- <!-- 删除文件定时服务 end -->
- </beans>
|