0
点赞
收藏
分享

微信扫一扫

SpringBoot使用SpringTask实现定时任务


1.启动类添加@EnableScheduling

2.创建定时任务类,并在类上使用@Compnent

3.创建一个方法,并在方法上使用@Scheduled(cron = "0 30 14 * * ?")

在线Cron表达式生成器:​​http://cron.qqe2.com/​​

springboot整合Quartz实现动态配置定时任务​

举报

相关推荐

0 条评论