Clarification of Temporal Schedule behaviour while using ScheduleInterval

When I posted I got recommended this post here

The github discussion mentioned led to me finding that this seems to work in java. There were no phase parameter in java, but i implied it were the offset

var offset = getNextDate().toInstant().getEpochSecond()
          % (60L * 60L * 24L * 7L * recurrence.getInterval());
        scheduleSpec.setIntervals(List.of(new
            ScheduleIntervalSpec(Duration.ofDays(7L * recurrence.getInterval()),
            Duration.ofSeconds(offset))));

EDIT: Strangely when we start to get in the month range this formula seems not to work 100%. The original situal started to happen again.