{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "schedule-schema-export", "title": "Exported Schedule Triggers Schema", "description": "Schema for an exported Schedule Trigger", "type": "object", "required": [ "name", "type", "enabled", "actionType", "actionId", "firstRunAt", "processMissedRuns" ], "allOf": [ { "$ref": "#/definitions/invariantProperties" }, { "$ref": "#/definitions/covariantProperties" } ], "definitions": { "invariantProperties": { "type": "object", "properties": { "_id": { "$ref": "common-ops-schema#/definitions/ObjectId" }, "created": { "$ref": "common-ops-schema#/definitions/ISODate" }, "createdBy": { "type": "string" }, "lastUpdated": { "$ref": "common-ops-schema#/definitions/ISODate" }, "lastUpdatedBy": { "type": "string" }, "name": { "$ref": "common-ops-schema#/definitions/name" }, "enabled": { "$ref": "common-ops-schema#/definitions/enabled" }, "actionType": { "$ref": "common-ops-schema#/definitions/actionType" }, "actionId": { "$ref": "common-ops-schema#/definitions/ObjectId" }, "type": { "const": "schedule" }, "formData": { "oneOf": [ { "type": "object" }, { "type": "null" } ] }, "firstRunAt": { "description": "A timestamp in milliseconds for the first scheduled run of this job.", "type": "integer", "minimum": 0 }, "lastExecuted": { "description": "A timestamp in milliseconds of the time this job was last executed.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "nextRunAt": { "description": "A timestamp in milliseconds for the next scheduled run of this job.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "stopRunningAt": { "description": "A millisecond resolution timestamp denoting when to stop this schedule. This is calculated using repeatEnd and lastIntervalStart.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "lastIntervalStart": { "description": "A millisecond resolution timestamp denoting when the current run interval started. This is calculated using repeatEnd.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "repeatInterval": { "description": "The interval between repeated jobs in milliseconds. This is calculated from repeatUnit and repeatFrequency.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "processMissedRuns": { "description": "Describes how any missed job runs should be processed. A missed run is a job that was supposed to be ran at least 'n' seconds ago, but did not due to some issue with IAP (busy process, IAP was down, etc). 'none' means do not run any missed jobs. 'last' means only run the last missed job.", "type": "string", "enum": [ "none", "last" ] }, "waitFlag": { "description": "backend use only", "type": "boolean" }, "repeatEnd": { "description": "The condition used to determine when to end the repeat interval", "type": "object", "oneOf": [ { "type": "null" }, { "$ref": "#/definitions/repeatEndSingleInterval" }, { "$ref": "#/definitions/repeatEndMultipleInterval" } ] }, "formId": { "type": [ "string", "null" ] } } }, "covariantProperties": { "type": "object", "additionalProperties": true, "oneOf": [ { "properties": { "repeatUnit": { "type": "null" }, "repeatFrequency": { "type": "null" } } }, { "properties": { "repeatUnit": { "type": "string", "enum": [ "minute", "hour", "day", "week" ] }, "repeatFrequency": { "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] } }, "required": [ "repeatUnit" ] }, { "properties": { "repeatUnit": { "const": "second" }, "repeatFrequency": { "oneOf": [ { "type": "integer", "minimum": 0, "multipleOf": 10 }, { "type": "null" } ] } }, "required": [ "repeatUnit", "repeatFrequency" ] } ] }, "repeatEndSingleInterval": { "properties": { "endAfter": { "description": "A millisecond resolution time diff relative to lastInterval denoting when to stop the repeat interval. Must be a multiple of 10000ms (10s).", "oneOf": [ { "type": "integer", "minimum": 0, "multipleOf": 10000 } ] }, "restartAfter": { "description": "A millisecond resolution time diff relative to lastInterval + repeatEnd.endAfter denoting when to restart the repeat interval. Must be a multiple of 10000ms (10s).", "oneOf": [ { "type": "integer", "minimum": 0, "multipleOf": 10000 }, { "type": "null" } ] }, "removeAfterEnd": { "description": "Tells the scheduler engine to delete this trigger after it's execution window has elapsed.", "type": "boolean" } }, "required": [ "endAfter", "restartAfter", "removeAfterEnd" ] }, "repeatEndMultipleInterval": { "properties": { "endAfter": { "description": "A millisecond resolution time diff relative to lastInterval denoting when to stop the repeat interval. Must be a multiple of 10000ms (10s).", "type": "integer", "minimum": 0, "multipleOf": 10000 }, "restartAfter": { "description": "A millisecond resolution time diff relative to lastInterval + repeatEnd.endAfter denoting when to restart the repeat interval. Must be a multiple of 10000ms (10s).", "type": "integer", "minimum": 0, "multipleOf": 10000 }, "removeAfterEnd": { "description": "Tells the scheduler engine to delete this trigger after it's execution window has elapsed.", "type": "null" } }, "required": [ "endAfter", "restartAfter", "removeAfterEnd" ] } } }