java - Spring计划的cron在3 :00 to 6:30之间

标签 java spring cron spring-scheduled

我想在 3:00 到 6:30 之间每 5 分钟安排一次作业。

这会在 3:00 到 5:55 之间每 5 分钟安排一次工作:

@Scheduled(cron = "0 0/5 3-5 * * *")

但是如何让 @scheduled 包含最后 35 分钟?

最佳答案

我会尝试

@Scheduled(cron = "0 0/5 3-6,5 * * *")

关于java - Spring计划的cron在3 :00 to 6:30之间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33668212/

相关文章:

java - 使用 Jsoup 1.11 解析 XHTML

java - 如何查找 hashmap a 中的值在 hashmap b 中是否不存在

java - Controller.Controller 中的错误字段存储库需要类型为 'Controller.Repository' 的 bean,但无法找到

java - 使用 Mockito 测试 Spring 环境配置文件

linux - 使用 crontab 自动重启 SNX

java - 从我的 JButtons 获取颜色

java - CAS SunCertPathBuilderException :unable to find valid certification path to requested target

spring boot - web mvc 测试未找到 Controller 映射

java - 如何取消或停止 Google App Engine Cron Job

php - 使用CRON导入远程.sql文件