springboot-bucket/springboot-schedule
Xiong Neng a5417dda3e 更新启动画面banner 2018-09-15 16:17:26 +08:00
..
src/main 更新启动画面banner 2018-09-15 16:17:26 +08:00
.gitignore 添加代码示例springboot-schedule 2018-02-27 19:28:19 +08:00
LICENSE 添加代码示例springboot-schedule 2018-02-27 19:28:19 +08:00
README.md 添加代码示例springboot-schedule 2018-02-27 19:28:19 +08:00
pom.xml 2.0依赖升级完成 2018-09-09 22:16:56 +08:00
run.sh 添加代码示例springboot-schedule 2018-02-27 19:28:19 +08:00

README.md

定时任务

定时任务非常简单,只需要写个配置类,然后定义定时任务类,使用注解定义某个方法定期执行

@Scheduled(cron = "0 26 19 * * ?")
public void checkState1() {
    logger.info(">>>>> xxx检查开始....");
    logger.info(">>>>> xxx传检查完成....");
}

许可证

Copyright (c) 2018 Xiong Neng

基于 MIT 协议发布: http://www.opensource.org/licenses/MIT