mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	【修复】定时任务指定某一年执行时,只会执行一次,后台查看任务详细会报错
Signed-off-by: 高高 <171376172@qq.com>
This commit is contained in:
		| @@ -46,6 +46,10 @@ public class CronUtils { | ||||
|         List<LocalDateTime> nextTimes = new ArrayList<>(n); | ||||
|         for (int i = 0; i < n; i++) { | ||||
|             Date nextTime = cron.getNextValidTimeAfter(now); | ||||
|             if (nextTime == null) { | ||||
|                 // 如果 nextTime 为 null,说明没有更多的有效时间,退出循环 | ||||
|                 break; | ||||
|             } | ||||
|             nextTimes.add(LocalDateTimeUtil.of(nextTime)); | ||||
|             // 切换现在,为下一个触发时间; | ||||
|             now = nextTime; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 高高
					高高