Skip to content

Create a new cron job

POST
/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/cron
curl --request POST \
--url https://dashboard.quantcdn.io/api/v3/organizations/test-org/applications/test-app/environments/test-env/cron \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "scheduleExpression": "example", "command": [ "example" ], "targetContainerName": "example", "isEnabled": true }'
organisation
required
string

The organisation ID

Example
test-org
application
required
string

The application ID

Example
test-app
environment
required
string

The environment ID

Example
test-env
Media typeapplication/json
object
name
required
string
description
string
nullable
scheduleExpression
required
string
command
required
Array<string>
targetContainerName
string
nullable
isEnabled
boolean
default: true nullable

The created cron job

Media typeapplication/json
object
name
string
description
string
nullable
scheduleExpression
string
command
Array<string>
targetContainerName
string
nullable
isEnabled
boolean
Examplegenerated
{
"name": "example",
"description": "example",
"scheduleExpression": "example",
"command": [
"example"
],
"targetContainerName": "example",
"isEnabled": true
}

The request is invalid

The request is invalid

Media typeapplication/json
object
message
string
errors
object
Examplegenerated
{
"message": "example",
"errors": {}
}