API Reference crons
Create a cron job
POST/projects/{project_id}/cron-jobs/
Schedule a meta-task on a cron expression.
Parameters
| Body field | Required | Description |
|---|---|---|
| name | yes | Display name |
| task_type_id | yes | Meta-task to dispatch |
| cron_expr | yes | Standard five-field cron expression |
| params | no | Fixed params merged into every run (default {}) |
| enabled | no | Pause without deleting (default true) |
Request
curl -X POST "$ALLYBUILD_API_URL/projects/$PROJECT_ID/cron-jobs/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
-d '{
"name": "Monday report",
"task_type_id": "5f4e3d2c-...",
"cron_expr": "0 9 * * 1",
"params": {"month": "2026-10"}
}'Response
{
"id": "1a2b3c4d-...",
"name": "Monday report",
"task_type_id": "5f4e3d2c-...",
"cron_expr": "0 9 * * 1",
"params": {"month": "2026-10"},
"enabled": true,
"next_execution": "2026-10-05T09:00:00Z"
}