Files
2025-11-30 09:06:02 +08:00

835 B

Crons API

Overview

The Crons API manages background jobs and scheduled tasks.

List Crons

GET /api/crons
Authorization: Bearer {admin_token}

Get Single Cron

GET /api/crons/{cronId}
Authorization: Bearer {admin_token}

Create Cron

POST /api/crons
Content-Type: application/json
Authorization: Bearer {admin_token}

{
  "name": "daily-backup",
  "query": "SELECT 1",
  "cron": "0 2 * * *",
  "schedule": "0 2 * * *"
}

Update Cron

PATCH /api/crons/{cronId}
Content-Type: application/json
Authorization: Bearer {admin_token}

{
  "cron": "0 3 * * *"
}

Delete Cron

DELETE /api/crons/{cronId}
Authorization: Bearer {admin_token}

Note: This is a placeholder file. See go/jobs_scheduling.md for background jobs.