Skip to content

Fix daily schedules across daylight saving changes - #36

Open
bensynapse wants to merge 1 commit into
Coreoz:masterfrom
bensynapse:fix-daily-dst-scheduling
Open

bensynapse wants to merge 1 commit into
Coreoz:masterfrom
bensynapse:fix-daily-dst-scheduling

Conversation

@bensynapse

Copy link
Copy Markdown

I run Live Tennis API.

In Europe/Paris, a daily 02:30 schedule queried at the second 02:15 returns a past timestamp. The scheduler then marks the job DONE, so it never runs.

FixedHourSchedule now compares resolved timestamps and advances a past occurrence to the next day. For spring clock changes, it waits for today's adjusted occurrence if that instant is still ahead.

The tests cover both transitions and confirm that a real Scheduler keeps the daily job scheduled. All three regressions fail against the original code.

mvn -B clean test jacoco:report passes all 69 tests on Java 21. mvn -B -DskipTests package also passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant