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",
"cronExpression": "0 9 * * *",
"timezone": "America/New_York",
"endpoint": "https://api.example.com/health",
"httpMethod": "GET",
"isEnabled": true,
"nextRunAtUtc": "2024-01-15T14:00:00.000Z",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-14T14:00:00.000Z",
"maxRetries": 3,
"timeoutSeconds": 30,
"description": "Check API health every day at 9 AM",
"body": "{\"key\": \"value\"}",
"headers": "{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}",
"lastRunAtUtc": "2024-01-14T14:00:00.000Z"
},
"success": true
}Update an existing schedule. All fields are optional - only include fields you want to update.
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",
"cronExpression": "0 9 * * *",
"timezone": "America/New_York",
"endpoint": "https://api.example.com/health",
"httpMethod": "GET",
"isEnabled": true,
"nextRunAtUtc": "2024-01-15T14:00:00.000Z",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-14T14:00:00.000Z",
"maxRetries": 3,
"timeoutSeconds": 30,
"description": "Check API health every day at 9 AM",
"body": "{\"key\": \"value\"}",
"headers": "{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}",
"lastRunAtUtc": "2024-01-14T14:00:00.000Z"
},
"success": true
}API key for authentication. Get your API key from the Cronhost dashboard.
Unique schedule identifier
"schedule_123"
Human-readable schedule name
1 - 255"Updated Schedule Name"
Optional description of what the schedule does
1000"Updated description"
Valid cron expression defining when to run
"0 10 * * *"
IANA timezone identifier
"UTC"
Target HTTP endpoint URL
"https://api.example.com/health"
HTTP method to use for the request
GET, POST, PUT, DELETE, PATCH "POST"
Request body for POST/PUT/PATCH requests
"{\"updated\": true}"
HTTP headers as JSON string
"{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}"
Maximum number of retry attempts
0 <= x <= 105
Request timeout in seconds
1 <= x <= 30060