Scheduling Technical Reference

Summary

  • Schedule State is used to define Schedules - including Reminders and Scheduled Reports
  • The Schedule API contains functions to manage schedules progammatically
  • The Schedule Triggered Event fires when a Schedule has been run

Schedule State

The Schedule section of Adaptable State contains a collection of Reminders and a number of Schedules:

PropertyDescription
IPushPullSchedulesSchedules connected to ipushpull Reports - available if ipushpull plugin is running
OpenFinSchedulesSchedules connected to OpenFin exports - available if OpenFin plugin is running
RemindersSchedules connected to Reminders - Alerts that fire at set times
ReportSchedulesSchedules connected to Reports (created in the Export function)

Schedule Object

The base Schedule object is defined as follows:

PropertyDescription
DaysOfWeekDays on which Schedule will run
HourHour the Schedule will run
MinuteMinute the Schedule will run
OneOffDateA one off date on which the Schedule will run

Reminder

A Reminder is defined as follows:

PropertyDescription
DisplayNotificationDisplays Reminder as a Toast Notification
DisplaySystemStatusMessageShows Reminder as System Status Message
HeaderReminder header text
MessageReminder body text
MessageTypeType of Message - 'Success', 'Info', 'Warning' or 'Error'

Report

A Scheduled Report is defined as follows:

PropertyDescription
ExportDestinationDestination of Report to run on Schedule
ReportFormatFormat of Report to run on Schedule
ReportNameName of Report to run on Schedule

Schedule API

Full programmatic access to Schedules and related features is available in Schedule API.

The large number of functions enable all the different types of Schedules to be accessed, created, edited, suspended, deleted and shared programmatically:

MethodDescription
addIPushPullSchedule(iPushPullSchedule)Add ipushpull-based Schedule
addOpenFinSchedule(openFinSchedule)Add OpenFin-based Schedule
addReminderSchedule(reminderSchedule)Adds Reminder-based Schedule
addReportSchedule(reportSchedule)Adds Report / Export Schedule
applySchedule(schedule, scheduleType)Applies the Schedule of given type
deleteIPushPullSchedule(iPushPullSchedule)Delete ipushpull-based Schedule
deleteOpenFinSchedule(openFinSchedule)Delete OpenFin-based Schedule
deleteReminderSchedule(reminderSchedule)Deletes Reminder-based Schedule
deleteReportSchedule(reportSchedule)Deletes Report / Export Schedule
editIPushPullSchedule(iPushPullSchedule)Edit ipushpull-based Schedule
editOpenFinSchedule(openFinSchedule)Edit OpenFin-based Schedule
editReminderSchedule(reminderSchedule)Edits Reminder-based Schedule
editReportSchedule(reportSchedule)Edits Report / Export Schedule
editSchedule(schedule)Edits a Schedule
getActiveIPushPullSchedules()Retrieves all active (not-suspended) ipushpull-based Schedules from Schedule State
getActiveOpenFinSchedules()Retrieves all active (not-suspended) OpenFin-based Schedules from Schedule State
getActiveReminderSchedules(config)Retrieves all active (not-suspended) Reminder-based Schedules from Schedule State
getActiveReportSchedules()Retrieves all active (not-suspended) Report / Export Schedules from Schedule State
getIPushPullSchedules(config)Retrieves all ipushpull-based Schedules from Schedule State
getOpenFinSchedules(config)Retrieves all OpenFin-based Schedules from Schedule State
getReminderSchedules(config)Retrieves all Reminder-based Schedules from Schedule State
getReportSchedules(config)Retrieves all Report / Export Schedules from Schedule State
getScheduleById(id, config)Retrieves Schedule by id
getScheduleByName(name)Retrieves a Schedule by its Name
getSchedules(config)Retrieves the Schedule section from Adaptable State
getScheduleState()Retrieves Schedule section from Adaptable State
getSuspendedIPushPullSchedules()Retrieves all suspended ipushpull-based Schedules from Schedule State
getSuspendedOpenFinSchedules()Retrieves all suspended OpenFin-based Schedules from Schedule State
getSuspendedReminderSchedules(config)Retrieves all suspended Reminder-based Schedules from Schedule State
getSuspendedReportSchedules()Retrieves all suspended Report / Export Schedules from Schedule State
openScheduleSettingsPanel()Opens Settings Panel with Schedule section selected and visible
suspendIPushPullSchedule(iPushPullSchedule)Suspends ipushpull-based Schedule
suspendOpenFinSchedule(openFinSchedule)Suspends OpenFin-based Schedule
suspendReminderSchedule(reminderSchedule)Suspends Reminder-based Schedule
suspendReportSchedule(reportSchedule)Suspends Report / Export Schedule
unSuspendIPushPullSchedule(iPushPullSchedule)Activates a suspended ipushpull-based Schedule
unSuspendOpenFinSchedule(openFinSchedule)Activates a suspended OpenFin-based Schedule
unSuspendReminderSchedule(reminderSchedule)Activates a suspended Reminder-based Schedule
unSuspendReportSchedule(reportSchedule)Activates a suspended Report / Export Schedule

Schedule Triggered Event

The Schedule Triggered Event is triggered whenever a Schedule is triggered in AdapTable.

ScheduleTriggeredInfo

The ScheduleTriggeredInfo object provided by the event contains the Schedule that was triggered:

PropertyDescription
scheduleSchedule that was Triggered
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext

Event Subscription

Subscribing to the Event is done the same way as with all Adaptable Events:

api.eventApi.on('ScheduleTriggered', (eventInfo: ScheduleTriggeredInfo) => {
    // do something with the info
});