Skip to navigation

Update a schedule

A request can’t give a schedule a form or change the one it has. Inputs are cleaned against the form a schedule already has, if any. A request that sets inputs looks that form up, even for empty inputs, and saves the inputs without the values the form no longer has. A schedule with no form, which is every schedule created for a service, saves the inputs as sent. The response shows what was saved.

A form that can’t be loaded fails the write and nothing is saved, not even other changes in the same request. The error says why in formFailure: 422 NOT_FOUND, 403 FORBIDDEN, 503 UNAVAILABLE.

A paused schedule can’t be resumed with status set to active while its service’s trigger set is disabled. The request fails with 409 and nothing is saved, not even other changes in the same request. Pausing and editing stay allowed, and active on a schedule that’s already active is accepted. Enabling or disabling the trigger set never changes a schedule’s own status.

A completed or expired schedule runs again when the request replaces its schedule with one that has a run. It becomes active with its next run worked out from now, and a limit on occurrences counts again from now. A new schedule with no run fails and the schedule stays as it was. Running a schedule again starts it, so while the trigger set of its service is disabled, the request fails with 409 and nothing is saved, unless it asks for paused. Sending the same limit on occurrences again keeps its used-up end date, so it fails too.

Edits that set no inputs, such as pause, resume, a new schedule, the missed-run policy, or legacyWrapper, never look the form up and leave the stored inputs as they are. A schedule whose form was deleted can still be paused or resumed.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

scheduleIdstringRequired

The schedule’s unique identifier (triggers._id), a UUIDv7.

Request

body
scheduleobjectOptional
A replacement schedule. Omit to leave the schedule unchanged.
inputsobjectOptional
Replacement inputs the service is requested with each time the schedule fires. Values the schedule's own form, if it has one, no longer has are removed when they are saved. Omit to leave them unchanged.
statusenumOptional

paused stops the schedule firing; active resumes it and works out when it fires next. Omit to leave the status unchanged.

Allowed values:
missedRunPolicyenumOptional
What to do with an occurrence found overdue. Leave out to keep the current policy.
Allowed values:
legacyWrapperbooleanOptional

Legacy field, kept only to support workflows written for the old input shape: before July 2023, Operations Manager passed form values to the workflow inside one variable named formData. Omit to leave unchanged. Turning it on is refused unless the service’s asset is a workflow.

Response

result
scheduleIdstring
Identifier of the schedule.
serviceIdstring
Identifier of the service the schedule requests.
serviceNamestring
Name of that service.
triggerSetEnabledboolean
Master switch that determines whether the trigger and any services associated with it can fire. When false, they cannot fire, regardless of this schedule's own status.
createdByobject

The user who created the schedule. principalId is Pronghorn when no creator is recorded.

createdAtstring
When the schedule was created, ISO 8601 in UTC.
lastUpdatedAtstring

When the schedule was last changed by a user (an edit, a pause or a resume), ISO 8601 in UTC.

statusenum

active fires as scheduled; paused was stopped by a user; completed fired its last occurrence; expired ended without firing its last occurrence.

Allowed values:
scheduleTypeenum

recurring repeats on its schedule; concrete fires once, at concreteDate.

Allowed values:
inputobject
Inputs the service is requested with each time the schedule fires.
missedRunPolicyenum

What happens to an occurrence found overdue, such as after downtime: skip drops it and waits for the next one; fireOnce fires it, however late.

Allowed values:
legacyWrapperboolean

Legacy field, kept only to support workflows written for the old input shape: before July 2023, Operations Manager passed form values to the workflow inside one variable named formData. False unless it was turned on.

scheduleobjectOptional

How a recurring schedule repeats, and its start and end. Absent for a concrete schedule.

concreteDatestringOptional

The instant a concrete schedule fires, ISO 8601 in UTC. Set only when scheduleType is concrete. A request sets it as schedule.concreteDate.

formIdstringOptional
Id of the form the inputs were filled in on. Absent when the schedule has no form.
lastRunstringOptional
When the schedule last fired, ISO 8601 in UTC. Absent if it has never fired.
nextRunstringOptional

When the schedule is next due, ISO 8601 in UTC. Present only while the status is active.

Errors

500
Internal Server Error