shine_cn

Your heart is free, so have the courage to follow it.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Spring3.0.6定时任务task:scheduled

Posted on 2015-04-20 12:44  shine_cn  阅读(292)  评论(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>