首页 > 编程语言 > 详细

springboot项目使用定时器注解@Scheduled(cron = "0 0 14 * * ?")

时间:2021-06-24 15:42:31      阅读:17      评论:0      收藏:0      [点我收藏+]

1、在SpringBoot项目的启动类上加上 

@EnableScheduling

2、在需要定时执行的方法上加上

@Scheduled(cron = "0 0 14 * * ?")

springboot项目使用定时器注解@Scheduled(cron = "0 0 14 * * ?")

原文:https://www.cnblogs.com/shycnblogs/p/14926702.html

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