A recurring timer that runs one integration pipeline on a fixed interval, such as every three days or every month. The schedule names the pipeline by its id and is attached to either a website branch or a website, which is where the pipeline definition is loaded from. The interval is a unit plus a multiple, and the time of day is taken from the start date so repeated runs do not drift; hours is not currently a supported unit. An optional day name pins a run to a particular weekday, in which case the calculated time is rolled forward to the next matching day. The next run is held in scheduledEndDate, which is what the dispatcher polls, and all of the date arithmetic is done in the owning account's timezone.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
branchBranchThe website branch the pipeline definition is loaded from. A schedule is attached either to a branch or to a website, so this is null when a website is set. Only schedules on a repository's live branch are picked up by the dispatcher.
dayNameStringOptional English weekday name, for example Monday, that runs are pinned to. When set, a calculated run time is rolled forward day by day until it lands on this weekday.
endDateDateWhen the schedule stops recurring.
fireForProfileProfileThe profile the scheduled run is performed as, which decides what the pipeline is allowed to see and do.
idlongDatabase identifier for this schedule.
pipelineIdStringIdentifies which pipeline in the branch or website this schedule runs.
scheduledEndDateDateWhen the next run is due. This is the column the dispatcher polls, picking up any schedule whose value is at or before now, so it must be advanced after each run or the schedule fires again immediately.
scheduleTypeScheduleTypeWhether the scheduled pipeline pulls data in or pushes data out, being inbound or outbound.
startDateDateWhen the schedule begins. As well as the first run, its time of day fixes the time every later run happens at, which is how repeated runs are kept from drifting.
timerMultipleIntegerHow many of the timer units make up one interval, so three with a unit of days means every three days.
timerUnitTimeUnitThe unit of the repeat interval: days, weeks, months or annual. Hours is defined but not supported, and asking for it makes the next run time calculation return null.
websiteWebsiteThe website the pipeline definition is loaded from, as the alternative to attaching the schedule to a branch.

Methods

getId() · getBranch() · getWebsite() · getPipelineId() · getScheduleType() · getStartDate() · getEndDate() · getFireForProfile() · getTimerUnit() · getTimerMultiple() · getDayName() · getScheduledEndDate() · calcNextTimerFireAt() · findTimeUnit(String name) · findScheduleType(String name)

getId()

Returns: long

Database identifier for this schedule.

getBranch()

Returns: Branch

The website branch the pipeline definition is loaded from. A schedule is attached either to a branch or to a website, so this is null when a website is set. Only schedules on a repository's live branch are picked up by the dispatcher.

getWebsite()

Returns: Website

The website the pipeline definition is loaded from, as the alternative to attaching the schedule to a branch.

getPipelineId()

Returns: String

Identifies which pipeline in the branch or website this schedule runs.

getScheduleType()

Returns: ScheduleType

Whether the scheduled pipeline pulls data in or pushes data out, being inbound or outbound.

getStartDate()

Returns: Date

When the schedule begins. As well as the first run, its time of day fixes the time every later run happens at, which is how repeated runs are kept from drifting.

getEndDate()

Returns: Date

When the schedule stops recurring.

getFireForProfile()

Returns: Profile

The profile the scheduled run is performed as, which decides what the pipeline is allowed to see and do.

getTimerUnit()

Returns: TimeUnit

The unit of the repeat interval: days, weeks, months or annual. Hours is defined but not supported, and asking for it makes the next run time calculation return null.

getTimerMultiple()

Returns: Integer

How many of the timer units make up one interval, so three with a unit of days means every three days.

getDayName()

Returns: String

Optional English weekday name, for example Monday, that runs are pinned to. When set, a calculated run time is rolled forward day by day until it lands on this weekday.

getScheduledEndDate()

Returns: Date

When the next run is due. This is the column the dispatcher polls, picking up any schedule whose value is at or before now, so it must be advanced after each run or the schedule fires again immediately.

calcNextTimerFireAt()

Returns: Date

Works out when this schedule should next run, by adding the interval to the current time and setting the time of day from the start date. If a day name is set the result is rolled forward to the next matching weekday. Returns null for an hourly schedule, which is not supported, and for a schedule with no timer unit.

findTimeUnit(String name)

Returns: TimeUnit

Looks up a timer unit by name, ignoring case, so a schedule can be configured from a string. Cheap: this only scans the enum's values.

ParameterDescription
namethe unit name, such as DAYS or weeks

findScheduleType(String name)

Returns: ScheduleType

Looks up a schedule type by name, ignoring case, so a schedule can be configured from a string. Cheap: this only scans the enum's values.

ParameterDescription
namethe type name, being INBOUND or OUTBOUND in any case
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.