Cron Scheduler
Cron-Based Task Scheduling
Schedule tasks with full cron expression support
The Cron Scheduler provides full cron expression parsing and task scheduling. Schedule recurring tasks, pause and resume jobs, calculate next run times, and schedule one-off delayed tasks. Persistent job storage ensures tasks survive restarts.
Cron
Expressions
Pause
Resume
Once
Delayed
Next
Run Calc
Cron Expression Format
Format:
* * * * * (minute hour day month weekday)
Minute
0-59
Hour
0-23
Day
1-31
Month
1-12
Weekday
0-6
0 * * * *
Every hour on the hour
*/15 * * * *
Every 15 minutes
0 9 * * 1-5
Weekdays at 9 AM
0 0 1 * *
First day of month at midnight
API Endpoints
POST
/api/v1/automation/schedule
Schedule a recurring task.
Request:
{
"task_type": "data_sync",
"cron_expression": "0 */6 * * *",
"payload": {"source": "db1", "target": "db2"},
"agent_id": "agent_uuid"
}
PUT
/api/v1/automation/schedule/:id/pause
Pause a scheduled task.
PUT
/api/v1/automation/schedule/:id/resume
Resume a paused task.
GET
/api/v1/automation/schedule/:id/next_runs
Calculate next N run times.
Response:
{
"next_runs": [
"2026-03-10T16:00:00Z",
"2026-03-10T22:00:00Z",
"2026-03-11T04:00:00Z"
]
}