Class ScheduleSpec.Builder

  • Enclosing class:
    ScheduleSpec

    public static final class ScheduleSpec.Builder
    extends java.lang.Object
    • Method Detail

      • setCronExpressions

        public ScheduleSpec.Builder setCronExpressions​(java.util.List<java.lang.String> cronExpressions)
        Set the cron-based specification of times a schedule should run.

        This is provided for easy migration from legacy string-based cron scheduling. New uses should use ScheduleSpec.calendars instead. These expressions will be translated to calendar-based specifications on the server.

      • setStartAt

        public ScheduleSpec.Builder setStartAt​(java.time.Instant startAt)
        Set the start time of the schedule, before which any matching times will be skipped.
      • setEndAt

        public ScheduleSpec.Builder setEndAt​(java.time.Instant endAt)
        Set the end time of the schedule, after which any matching times will be skipped.
      • setJitter

        public ScheduleSpec.Builder setJitter​(java.time.Duration jitter)
        Set the jitter to apply to each action.

        An action's schedule time will be incremented by a random value between 0 and this value if present (but not past the next schedule).

      • setTimeZoneName

        public ScheduleSpec.Builder setTimeZoneName​(java.lang.String timeZoneName)
        Set the schedules time zone as a string, for example US/Central.