POST
/applications/{uuid}/scheduled-tasksCreate a scheduled task for an application
Creates a scheduled task for an application. Supply name, command, and frequency; enabled defaults to true and timeout defaults to 300 seconds. 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 application to add the scheduled task to.
Scheduled task data, including the required name, command, and frequency fields.
commandstringrequired
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.
frequencystringrequired
The frequency of the scheduled task.
namestringrequired
The name of the scheduled task.
timeoutintegeroptional
The timeout of the scheduled task in seconds.
201Returns the created 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 application 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 an application; and a 422 when task data fails validation. name, command, and frequency are required, and timeout must not exceed 36000 seconds.