首页 > 编程语言 > 详细

Spring3.0.6定时任务task:scheduled

时间:2015-04-20 14:30:52      阅读:374      评论:0      收藏:0      [点我收藏+]
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd 
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
http://www.springframework.org/schema/task 
http://www.springframework.org/schema/task/spring-task-3.0.xsd">

<!-- 定时关闭日常标注任务(21:00执行) -->    
<bean id="shutdownScheduleTask" class="com.baidu.dpop.ctp.schedule.ShutdownScheduleTask">
</bean>
<task:scheduled-tasks> 
<task:scheduled ref="shutdownScheduleTask" method="execute" cron="00 00 21 * * *" /> 
</task:scheduled-tasks>

<!-- 定时回收已分配的标注&审核Group 5分钟运行一次 1000*60*5 -->
<bean id="recycleAssignGroupTask" class="com.baidu.dpop.ctp.schedule.RecycleAssignGroupTask">
</bean>
<task:scheduled-tasks> 
<task:scheduled ref="recycleAssignGroupTask" method="execute" fixed-rate="300000" /> 
</task:scheduled-tasks>
</beans>

 

 

Spring3.0.6定时任务task:scheduled

原文:http://www.cnblogs.com/shine_cn/p/4441237.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!