Skip to main content
A cron is a recurring scheduled webhook. You define a cron expression (e.g., */5 * * * * for every 5 minutes) and CronAPI fires an HTTP request to your URL on that schedule.

Cron object

FieldTypeDescription
idstringUnique identifier (UUID)
namestring | nullOptional display name
cronstringCron expression defining the schedule
urlstringWebhook URL to call
methodstringHTTP method: GET, POST, or DELETE
headersobjectCustom HTTP headers sent with the request
bodyobjectJSON body sent with POST requests
pausedbooleanWhether execution is paused
next_run_atstringISO 8601 timestamp of the next scheduled run
last_run_atstring | nullISO 8601 timestamp of the most recent execution
created_atstringISO 8601 timestamp of creation

Cron expressions

CronAPI uses standard 5-field cron syntax:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Examples:
ExpressionSchedule
* * * * *Every minute
*/5 * * * *Every 5 minutes
0 * * * *Every hour
0 9 * * *Daily at 9:00 AM UTC
0 9 * * 1Every Monday at 9:00 AM UTC
0 0 1 * *First day of every month at midnight
Cron expressions are validated on creation and update. Invalid expressions return a 400 error.

Pausing and resuming

You can pause a cron to temporarily stop execution without deleting it. Update the paused field to true:
curl -X PATCH https://app.cronapi.dev/api/v1/crons/:id \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"paused": true}'
Set paused to false to resume. The next_run_at is recalculated automatically when you update the cron expression.

Webhook execution

When a cron fires, CronAPI sends an HTTP request with:
  • The configured method (GET, POST, or DELETE)
  • Your custom headers merged with Content-Type: application/json
  • The body serialized as JSON (for POST requests)
  • A 30-second timeout — requests that exceed this are terminated
Each execution is logged as a run with the status code, response time, and any error details.

Manual trigger

You can fire a cron immediately using the trigger endpoint without affecting the regular schedule.