ITeye博客

spring

共 1 篇文章

spring的cron定时任务解析

在用spring定时任务时,配置如下: <task:executor id="executor" pool-size="5" /> <task:scheduler id="scheduler" pool-size="10" /> <task:annotation-driven executor="executor" scheduler="scheduler" /> 配置项schema为spring-task-3.0.xsd。 对某方法定义cron如下: @Scheduled(cron = "0 */5 * * * ?") pulic void run(){ //other codes… } …

2014-03-12 17:37 · spring