The schedule definition to iterate over.
OptionalendsOn?: DateDo not repeat after this date
Repeat every minute
Number of intervals (days, months, minutes or weeks)
between repeats. Interval type depends of every value
OptionalmaxOccurences?: numberMax number of repeats (min 1)
OptionalskipFirst?: numberSkip this number of repeats. Min value is 1.
OptionalstartsOn?: DateDo not start earlier than this date
OptionalendsOn?: DateDo not repeat after this date
Repeat every day
Optionalhour?: numberHour (0-23)
Number of intervals (days, months, minutes or weeks)
between repeats. Interval type depends of every value
OptionalmaxOccurences?: numberMax number of repeats (min 1)
Optionalminute?: numberMinute (0-59)
OptionalskipFirst?: numberSkip this number of repeats. Min value is 1.
OptionalstartsOn?: DateDo not start earlier than this date
Days of week for schedule
OptionalendsOn?: DateDo not repeat after this date
Repeat every week
Optionalhour?: numberHour (0-23)
Number of intervals (days, months, minutes or weeks)
between repeats. Interval type depends of every value
OptionalmaxOccurences?: numberMax number of repeats (min 1)
Optionalminute?: numberMinute (0-59)
OptionalskipFirst?: numberSkip this number of repeats. Min value is 1.
OptionalstartsOn?: DateDo not start earlier than this date
Day - 'last' or number from 1 to 28
OptionalendsOn?: DateDo not repeat after this date
Repeat every month
Optionalhour?: numberHour (0-23)
Number of intervals (days, months, minutes or weeks)
between repeats. Interval type depends of every value
OptionalmaxOccurences?: numberMax number of repeats (min 1)
Optionalminute?: numberMinute (0-59)
OptionalskipFirst?: numberSkip this number of repeats. Min value is 1.
OptionalstartsOn?: DateDo not start earlier than this date
Day - 'last' or number from 1 to 28
OptionalendsOn?: DateDo not repeat after this date
Repeat every year
Optionalhour?: numberHour (0-23)
Number of intervals (days, months, minutes or weeks)
between repeats. Interval type depends of every value
OptionalmaxOccurences?: numberMax number of repeats (min 1)
Optionalminute?: numberMinute (0-59)
Month - number from 1 to 12
OptionalskipFirst?: numberSkip this number of repeats. Min value is 1.
OptionalstartsOn?: DateDo not start earlier than this date
Returns true when the schedule has at least one more date.
Optionalspan: numberOptional millisecond window. When provided the method
returns true only if the next date falls within span ms from now.
Advances to the next scheduled date and returns it together with its 1-based index in the sequence.
An object with the scheduled date and its index.
If the schedule has no more dates (hasNext is false).
Iterates over the dates defined by a Schedule.
Given a schedule configuration (e.g. every 2 days, every week on Monday/Friday, every month on the 15th) the calculator produces the sequence of
Dateobjects that match that schedule. Use hasNext / next to walk through the sequence.Example