CronExpression fails to calculate properly next execution when running on the day of daylight saving time (March 27, 2022) #28245
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
In reference to #28095:
Affects: Spring Boot 2.6.4 / Framework 5.3.16 as well as newest versions Spring Boot 2.6.5 / Framework 5.3.17
We had an issue on DST switch on Sunday, March 27, 2022
We're using a simple
TaskScheduler
bean and a method annotated with@Scheduler(cron = "0 30 2 * * ?")
The execution was just skipped when time was jumping from 2am to 3am. I've tried to...
@Scheduled
Both didn't work - tried it by resetting system time to March 27, 2022 - 01:59:30am.
During debugging I found
CronTrigger.nextExecutionTime()
always returning2022-03-28T02:30:00+02:00
Is there anything else I have to configure so that the execution is not just skipped? Or do I need a custom handling for this?
I've checked documentation as well as previous issues / fixes and couldn't find any specifics on how to properly handle this scenario where an execution falls into the "skipped" time frame between 2am ... 3am
I've also tried it with the newest versions Spring Boot 2.6.5 / Framework 5.3.17 (because this was fixed) and resetting the time of my machine to March 27, 01:59:30am - the execution was skipped again
The text was updated successfully, but these errors were encountered: