Package io.temporal.client.schedules
Class ScheduleSpec.Builder
- java.lang.Object
-
- io.temporal.client.schedules.ScheduleSpec.Builder
-
- Enclosing class:
- ScheduleSpec
public static final class ScheduleSpec.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduleSpec
build()
ScheduleSpec.Builder
setCalendars(java.util.List<ScheduleCalendarSpec> calendars)
Set the calendar-based specification of times a schedule should run.ScheduleSpec.Builder
setCronExpressions(java.util.List<java.lang.String> cronExpressions)
Set the cron-based specification of times a schedule should run.ScheduleSpec.Builder
setEndAt(java.time.Instant endAt)
Set the end time of the schedule, after which any matching times will be skipped.ScheduleSpec.Builder
setIntervals(java.util.List<ScheduleIntervalSpec> intervals)
Set the interval-based specification of times a schedule should run.ScheduleSpec.Builder
setJitter(java.time.Duration jitter)
Set the jitter to apply to each action.ScheduleSpec.Builder
setSkip(java.util.List<ScheduleCalendarSpec> skip)
Set the calendar-based specification of times a schedule should not run.ScheduleSpec.Builder
setStartAt(java.time.Instant startAt)
Set the start time of the schedule, before which any matching times will be skipped.ScheduleSpec.Builder
setTimeZoneName(java.lang.String timeZoneName)
Set the schedules time zone as a string, for exampleUS/Central .
-
-
-
Method Detail
-
setCalendars
public ScheduleSpec.Builder setCalendars(java.util.List<ScheduleCalendarSpec> calendars)
Set the calendar-based specification of times a schedule should run.
-
setIntervals
public ScheduleSpec.Builder setIntervals(java.util.List<ScheduleIntervalSpec> intervals)
Set the interval-based specification of times a schedule should run.
-
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.
-
setSkip
public ScheduleSpec.Builder setSkip(java.util.List<ScheduleCalendarSpec> skip)
Set the calendar-based specification of times a schedule should not run.
-
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 exampleUS/Central .
-
build
public ScheduleSpec build()
-
-