PATCH
/services/{uuid}/scheduled-tasks/{task_uuid}Update a scheduled task for a service
Updates a scheduled task for a service. Supply the fields you want to change, such as command, frequency, or enabled; an enabled task requires a token with the deploy ability.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
uuidstringrequired
The UUID of the service that contains the scheduled task.
task_uuidstringrequired
The UUID of the scheduled task to update.
Scheduled task fields to update. All fields are optional.
commandstringoptional
The command to execute.
containerstringoptional
The container where the command should be executed.
enabledbooleanoptional
The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.
frequencystringoptional
The frequency of the scheduled task.
namestringoptional
The name of the scheduled task.
timeoutintegeroptional
The timeout of the scheduled task in seconds.
200Returns the updated scheduled task, including its UUID, name, command, frequency, enabled state, timeout, and creation and update timestamps.
commandstringoptional
The command to execute.
containerstringoptional
The container where the command should be executed.
created_atstringoptional
The date and time when the scheduled task was created.
enabledbooleanoptional
The flag to indicate if the scheduled task is enabled.
frequencystringoptional
The frequency of the scheduled task.
idintegeroptional
The unique identifier of the scheduled task in the database.
namestringoptional
The name of the scheduled task.
timeoutintegeroptional
The timeout of the scheduled task in seconds.
updated_atstringoptional
The date and time when the scheduled task was last updated.
uuidstringoptional
The unique identifier of the scheduled task.
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when the token lacks the deploy ability required for an enabled task.
404Returned when the service or scheduled task cannot be found.
messagestringoptional
422Returned when the scheduled task data fails validation.
errorsobjectoptional
messagestringoptional
Error handling
A 401 is returned when the request is unauthenticated; a 403 when the token lacks the deploy ability for an enabled task; a 404 when the uuid path parameter does not identify a service or the task_uuid path parameter does not identify its scheduled task; and a 422 when task data fails validation. timeout must not exceed 36000 seconds.