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:
| Property | Description |
|---|---|
| IPushPullSchedules | Schedules connected to ipushpull Reports - available if ipushpull plugin is running |
| OpenFinSchedules | Schedules connected to OpenFin exports - available if OpenFin plugin is running |
| Reminders | Schedules connected to Reminders - Alerts that fire at set times |
| ReportSchedules | Schedules connected to Reports (created in the Export function) |
Schedule Object
The base Schedule object is defined as follows:
| Property | Description |
|---|---|
| DaysOfWeek | Days on which Schedule will run |
| Hour | Hour the Schedule will run |
| Minute | Minute the Schedule will run |
| OneOffDate | A one off date on which the Schedule will run |
Reminder
A Reminder is defined as follows:
| Property | Description |
|---|---|
| DisplayNotification | Displays Reminder as a Toast Notification |
| DisplaySystemStatusMessage | Shows Reminder as System Status Message |
| Header | Reminder header text |
| Message | Reminder body text |
| MessageType | Type of Message - 'Success', 'Info', 'Warning' or 'Error' |
Report
A Scheduled Report is defined as follows:
| Property | Description |
|---|---|
| ExportDestination | Destination of Report to run on Schedule |
| ReportFormat | Format of Report to run on Schedule |
| ReportName | Name 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:
| Method | Description |
|---|---|
| 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:
| Property | Description |
|---|---|
| schedule | Schedule that was Triggered |
| adaptableContext | Custom 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
});