码迷,mamicode.com
首页 > 编程语言 > 详细

Spring3.0.6定时任务task:scheduled

时间:2015-04-20 14:33:52      阅读:217      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!