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
| Property | Returns | Description |
|---|---|---|
| branch | 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. |
| dayName | 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. |
| endDate | Date | When the schedule stops recurring. |
| fireForProfile | Profile | The profile the scheduled run is performed as, which decides what the pipeline is allowed to see and do. |
| id | long | Database identifier for this schedule. |
| pipelineId | String | Identifies which pipeline in the branch or website this schedule runs. |
| scheduledEndDate | 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. |
| scheduleType | ScheduleType | Whether the scheduled pipeline pulls data in or pushes data out, being inbound or outbound. |
| startDate | 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. |
| timerMultiple | Integer | How many of the timer units make up one interval, so three with a unit of days means every three days. |
| timerUnit | 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. |
| website | Website | The 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.
| Parameter | Description |
|---|---|
name | the 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.
| Parameter | Description |
|---|---|
name | the type name, being INBOUND or OUTBOUND in any case |