I am using a scheduled task with annotation: @Scheduled(cron = "0 30 0 * * ?", zone = "Europe/Bratislava")

This task was successfully triggered every day, but after the Daylight saving time (DST) change, the task did not start on 2022/03/28 at 0.30 AM. The day after (2022/03/29), task was triggered again and continue triggering every day according to cron expression.

Other scheduled task used in application ran properly with annotation below: @Scheduled(cron = "0 0/5 * * * *", zone = "Europe/Bratislava")

Annotation is used from dependency org.springframework:spring-context:5.3.10

I am struggling to find out why scheduled task did not run. Does anyone know the answer, please?

Comment From: sbrannen

@poutsma, is this a potential duplicate of #28245?

Comment From: poutsma

@poutsma, is this a potential duplicate of #28245?

I don't think so, as that particular issue was about jobs not running between 2 and 3 am, something we have never supported. However, there have been a lot of fixes in the area of cron expressions since 5.3.10.

@ifc0 Can you please upgrade to the latest version of Spring Framework, which is currently 5.3.20, and see if the same problem occurs?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: ifc0

Sorry for late response. I tried to simulate the problem by running a test with CronExpression, which is used to calculate the next date in scheduled cron jobs:

ZonedDateTime current = ZonedDateTime.parse("2022-03-27T00:30+01:00[Europe/Bratislava]");

CronExpression cronExpression = CronExpression.parse("0 30 0 * * *");
ZonedDateTime next = cronExpression.next(current);
assertEquals("2022-03-28T00:30+02:00[Europe/Bratislava]", next.toString());

This test failed in 5.3.10 version, where is calculated 2022-03-29T00:30+02:00[Europe/Bratislava], but passed in 5.3.20, so this problem seems to be fixed. Thank you.