Class ScheduleSpec


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

      • getCronExpressions

        public java.util.List<java.lang.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.
      • getStartAt

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

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

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

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object