Hi everyone, we are implementing a feature using temporal schedules where we can define that a workflow should repeat at evey X time interval. I’m having some trouble while creating a weekly interval, as the first execution is always been scheduled for the next day first, then every week as I would expect. Could anyone provide some clarification on this behaviour ? I could not find anything in the docs.
The code im using is basically as follows
var scheduleSpec =
ScheduleSpec.newBuilder()
.setStartAt(OffsetDateTime.now().toInstant())
.setIntervals(List.of(new ScheduleIntervalSpec(Duration.of(7 , ChronoUnit.DAYS));
var schedule = Schedule.newBuilder().setAction(action).setSpec(scheduleSpec.build()).build();
scheduleClient.createSchedule(
scheduleRunId,
schedule,
ScheduleOptions.newBuilder().build());
Running it at 2024-10-23 give me the following upcoming runs
I would expect that the first run should have been at 2024-10-30 instead of 2024-10-24.
Could someone explain why it is scheduled to run at the next day ?
Thanks in advance!