Skip to content

Scheduling Service

Guide

The Scheduling Service will execute tasks at a specific time. This can be done in two ways, creating a scheduled schema, or creating a scheduled-task. The schedule-schema is for when we want to configure an action to happen repeatedly according to some RRule; for instance, creating a form every Monday. The scheduled schemas are queried periodically based on the nextScheduledDispatch time, a schedule task is then created, the schema is updated, and a cloud task is created. Cloud Tasks are not long lived so the schedule task is the source of for task status.

We must also creating of a single task (creating a document within the scheduled-tasks). These tasks are distinguished differently than tasks created from a schema with status != 'queued'. These scheduled tasks with empty status are queried periodically for upcoming dispatches. These are then sent to the same cloud task queue for creation. This is needed to support the single tasks that are to be completed far off in the future. Like training expiration notification and status changes / new training record creations.