Skip to main content
PUT
/
schedules
/
{id}
curl --request PUT \
--url https://cronho.st/api/v1/schedules/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "Updated Schedule Name"
}'
{
"data": {
"id": "schedule_123",
"name": "Daily Health Check",
"description": "Check API health every day at 9 AM",
"cronExpression": "0 9 * * *",
"timezone": "America/New_York",
"endpoint": "https://api.example.com/health",
"httpMethod": "GET",
"body": "{\"key\": \"value\"}",
"headers": "{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}",
"isEnabled": true,
"nextRunAtUtc": "2024-01-15T14:00:00.000Z",
"lastRunAtUtc": "2024-01-14T14:00:00.000Z",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-14T14:00:00.000Z",
"maxRetries": 3,
"timeoutSeconds": 30
},
"success": true
}

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 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

Maximum number of retry attempts

Required range: 0 <= x <= 10
Example:

5

timeoutSeconds
integer

Request timeout in seconds

Required range: 1 <= x <= 300
Example:

60

Response

Schedule updated successfully

data
object
required
success
boolean
required
Example:

true