Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantics of CalendarIntervalScheduleBuilder#preserveHourOfDayAcrossDaylightSavings #1136

Open
ghost opened this issue Jun 11, 2024 · 1 comment
Labels
is:support Support, help or questions

Comments

@ghost
Copy link

ghost commented Jun 11, 2024

Hello,

regarding CalendarIntervalScheduleBuilder#calendarIntervalSchedule. When I create a trigger like this:

val endOfMarch = LocalDateTime.of(2024, Month.MARCH, 31, 2, 30)
val schedule = CalendarIntervalScheduleBuilder.calendarIntervalSchedule().withIntervalInDays(1).preserveHourOfDayAcrossDaylightSavings(true)
TriggerBuilder
            .newTrigger()
            .forJob(scheduler.getJobDetail(JobKey.jobKey("myJob")))
            .startAt(Date.from(endOfMarch.atZone(ZoneId.systemDefault()).toInstant())
            .withSchedule(schedule)
            .build()

I assume that the time change will occur at 2 AM on 31st March (changing forward from 2 AM to 3 AM) and on 31st October at 3 AM (changing backward from to 3 AM to 2 AM).

As far as I understand the documentation it will be executed on March 31st (at 3:30 AM?). Will this trigger be executed once, twice or not at all on the October 31st? And if it is not executed at all on October 31: Can I create a trigger that is executed on every single day exactly once at 2:30 o'clock (accepting a different time at time-change-days)?

@lprimak

This comment was marked as outdated.

@jhouserizer jhouserizer added the is:support Support, help or questions label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:support Support, help or questions
Projects
None yet
Development

No branches or pull requests

2 participants