Skip to main content
Access via:io.platform.schedules

SchedulesAPIinterface

Provides methods for retrieving, updating, and resetting the predefined platform schedules for restart and shutdown, as well as for handling schedule changes.

⚠️ Note that the Platform Schedules API requires io.Connect Desktop 10.6 or later.

io.Connect Desktop 10.6@interopio/desktop 6.24.0

5 Methods

get()⚓︎

(name: ScheduleName) => Promise<Schedule>

Retrieves the specified platform schedule.

Parameters (1)

Name Type Required Description
name⚓︎ ScheduleName

Name of the schedule to retrieve.

list()⚓︎

() => Promise<Schedule[]>

Retrieves the platform restart and shutdown schedules, in that order.

onChanged()⚓︎

(callback: (schedule: Schedule) => void) => UnsubscribeFunction

Notifies when a platform schedule is changed. Returns an unsubscribe function.

Parameters (1)

Name Type Required Description
callback⚓︎ (schedule: Schedule) => void

Callback function for handling the event. Receives the changed schedule as an argument. The callback will be invoked separately for each changed schedule and won't be invoked when registered.

reset()⚓︎

(name: ScheduleName) => Promise<Schedule>

Removes user overrides, the custom cron expression, and custom schedule options. Administrator settings and defaults provided by the platform will apply to the reset fields. Locked fields will remain unchanged. Resolves with an object describing the reset schedule.

Parameters (1)

Name Type Required Description
name⚓︎ ScheduleName

Name of the schedule to reset.

update()⚓︎

(name: ScheduleName, changes: ScheduleUpdate) => Promise<Schedule>

Updates the specified platform schedule. Unspecified and locked fields will remain unchanged. Changing time, repeat, or day will replace the custom cron expression unless a new cron value is supplied. Timing values equal to their current values will be ignored. Resolves with an object describing the updated schedule.

Parameters (2)

Name Type Required Description
name⚓︎ ScheduleName

Name of the schedule to update.

changes⚓︎ ScheduleUpdate

Settings to update in the schedule.