Managing Schedulers
This document covers the scheduler lifecycle: creation with metadata, listing with search and filter, updating configuration, health monitoring, and deletion.
Creating a Scheduler
Create a new scheduler with an id and display name:
1curl -X POST "https://api.hola.cloud/schedulers" \
2 -H "X-API-Key: YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
6 "display_name": "email-scheduler"
7 }'
1POST /schedulers HTTP/1.1
2Host: api.hola.cloud
3X-API-Key: YOUR_API_KEY
4Content-Type: application/json
5
6{
7 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
8 "display_name": "email-scheduler"
9}
Expected response:
1{
2 "scheduler": {
3 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4 "ready": true,
5 "scheduled": 0,
6 "inflight": 0,
7 "display_name": "email-scheduler"
8 }
9}
Listing Schedulers
List all schedulers on your account (public):
1curl "https://api.hola.cloud/schedulers"
1GET /schedulers HTTP/1.1
2Host: api.hola.cloud
Expected response:
1{
2 "default_scheduler_id": "default",
3 "schedulers": [
4 {
5 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
6 "ready": true,
7 "scheduled": 5,
8 "inflight": 0,
9 "display_name": "email-scheduler"
10 }
11 ]
12}
Getting Scheduler Details
Retrieve a single scheduler by its ID:
1curl "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1GET /schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890 HTTP/1.1
2Host: api.hola.cloud
Expected response:
1{
2 "scheduler": {
3 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4 "ready": true,
5 "scheduled": 5,
6 "inflight": 0,
7 "display_name": "email-scheduler"
8 }
9}
Updating a Scheduler
Update the display name or other metadata:
1curl -X PATCH "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
2 -H "X-API-Key: YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "display_name": "email-scheduler-v2"
6 }'
1PATCH /schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890 HTTP/1.1
2Host: api.hola.cloud
3X-API-Key: YOUR_API_KEY
4Content-Type: application/json
5
6{
7 "display_name": "email-scheduler-v2"
8}
Expected response:
1{
2 "scheduler": {
3 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4 "ready": true,
5 "scheduled": 5,
6 "inflight": 0,
7 "display_name": "email-scheduler-v2"
8 }
9}
PUT can be used interchangeably with PATCH.
Health Monitoring
Check the health status of a scheduler at any time:
1curl "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890/health"
1GET /schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890/health HTTP/1.1
2Host: api.hola.cloud
Expected response:
1{
2 "status": "ok",
3 "ready": true,
4 "scheduled": 5,
5 "inflight": 0,
6 "scheduler_id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890"
7}
The health response reports the scheduler readiness and current scheduled/inflight counts.
Deleting a Scheduler
Permanently delete a scheduler and all its tasks:
1curl -X DELETE "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
2 -H "X-API-Key: YOUR_API_KEY"
1DELETE /schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890 HTTP/1.1
2Host: api.hola.cloud
3X-API-Key: YOUR_API_KEY
Expected response: HTTP 204 No Content.
Once deleted, the scheduler ID is no longer valid and all pending tasks are discarded.
Comments