Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 这个cron 0 0 30***。它在二月份开吗?春季时间表_Spring_Spring Boot_Cron_Schedule - Fatal编程技术网

Spring 这个cron 0 0 30***。它在二月份开吗?春季时间表

Spring 这个cron 0 0 30***。它在二月份开吗?春季时间表,spring,spring-boot,cron,schedule,Spring,Spring Boot,Cron,Schedule,我有一个带有此表达式的cron@Scheduled(cron=“0 30***”) 它在二月结束时运行吗 谢谢你的帮助 我的解决方案: 二月 cron = "0 0 0 28 2 *" 今年剩下的时间 cron = "0 0 0 30 1,3,4,5,6,7,8,9,10,11,12 *" 简短回答:没有 首先,看看这个,它将计算出cron表达式覆盖的下500个日期。运行cron表达式不包括2月份(我做了一些更改,因为它一开始是无效的) 其次,在每个月的第一天执行这项任务可能会更容易。如果可

我有一个带有此表达式的cron
@Scheduled(cron=“0 30***”)

它在二月结束时运行吗

谢谢你的帮助

我的解决方案: 二月

cron = "0 0 0 28 2 *"
今年剩下的时间

cron = "0 0 0 30 1,3,4,5,6,7,8,9,10,11,12 *"
简短回答:没有

首先,看看这个,它将计算出cron表达式覆盖的下500个日期。运行cron表达式不包括2月份(我做了一些更改,因为它一开始是无效的)

其次,在每个月的第一天执行这项任务可能会更容易。如果可能,检查您的业务逻辑

第三,如果你在一个月的最后一天需要它,检查post。第一个答案几乎涵盖了每个月

最后,如果您真的需要在除2月以外的每30天使用它,请尝试将2月和其他cron覆盖到一年的剩余时间:

0 0 0 28 2 ? *

不,不会的。这个问题可能会有帮助。真正地真不敢相信。