Skip to main content
PUT

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from the Cronhost dashboard.

Path Parameters

id
string
required

Unique schedule identifier

Example:

"schedule_123"

Body

application/json
name
string

Human-readable schedule name

Required string length: 1 - 255
Example:

"Updated Schedule Name"

description
string

Optional description of what the schedule does

Maximum string length: 1000
Example:

"Updated description"

cronExpression
string

Valid cron expression defining when to run

Example:

"0 10 * * *"

timezone
string

IANA timezone identifier

Example:

"UTC"

endpoint
string<uri>

Target HTTP endpoint URL

Example:

"https://api.example.com/health"

httpMethod
enum<string>

HTTP method to use for the request

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
Example:

"POST"

body
string

Request body for POST/PUT/PATCH requests

Example:

"{\"updated\": true}"

headers
string

HTTP headers as JSON string

Example:

"{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}"

maxRetries
integer

Total attempts including the first. Accepted values are clamped to 1-10 (0 becomes 1).

Example:

5

timeoutSeconds
integer

Request timeout in seconds. Accepted values are clamped to 1-300.

Example:

60

expectedStatusCodes
string

Comma-separated 3-digit codes/ranges counted as success (e.g. "200-299,410"). Pass an empty string to clear back to the default rule (status < 400).

Example:

"200-299,410"

Response

Schedule updated successfully

data
object
required
success
boolean
required
Example:

true