Class ScheduleSpec

java.lang.Object
io.temporal.client.schedules.ScheduleSpec

public final class ScheduleSpec extends Object
Specification of the times scheduled actions may occur. The times are the union of calendars, intervals, and cronExpressions excluding anything in skip.
  • Method Details

    • newBuilder

      public static ScheduleSpec.Builder newBuilder()
    • newBuilder

      public static ScheduleSpec.Builder newBuilder(ScheduleSpec options)
    • getCalendars

      public List<ScheduleCalendarSpec> getCalendars()
      Gets the calendar-based specification of times.
      Returns:
      list of ScheduleCalendarSpec the schedule may run at.
    • getIntervals

      public List<ScheduleIntervalSpec> getIntervals()
      Gets the interval-based specification of times.
      Returns:
      list of ScheduleIntervalSpec the schedule may run at.
    • getCronExpressions

      public List<String> getCronExpressions()
      Gets the cron-based specification of times.

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

      Returns:
      list of cron expressions the schedule may run at.
    • getSkip

      public List<ScheduleCalendarSpec> getSkip()
      Gets the set of matching calendar times that will be skipped.
      Returns:
      list of ScheduleCalendarSpec the schedule will not run at.
    • getStartAt

      public Instant getStartAt()
      Gets the time before which any matching times will be skipped.
      Returns:
      schedule start time
    • getEndAt

      public Instant getEndAt()
      Gets the time after which any matching times will be skipped.
      Returns:
      schedule end time
    • getJitter

      public Duration getJitter()
      Gets the jitter to apply to each action.
      Returns:
      amount of jitter applied
    • getTimeZoneName

      public String getTimeZoneName()
      Gets the IANA time zone name, for example US/Central.
      Returns:
      string representing the timezone.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object