Schedule Endpoints
Create Schedule
Create a new scheduled HTTP request with cron expression timing.
POST
/
schedules
Copy
curl --request POST \
--url https://cronho.st/api/v1/schedules \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"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",
"headers": "{\"User-Agent\": \"Cronhost-Monitor\"}",
"maxRetries": 3,
"timeoutSeconds": 30
}'
Copy
{
"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
API key for authentication. Get your API key from the Cronhost dashboard.
Body
application/json
Response
201
application/json
Schedule created successfully
The response is of type object
.
Copy
curl --request POST \
--url https://cronho.st/api/v1/schedules \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"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",
"headers": "{\"User-Agent\": \"Cronhost-Monitor\"}",
"maxRetries": 3,
"timeoutSeconds": 30
}'
Copy
{
"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
}
Assistant
Responses are generated using AI and may contain mistakes.