Schedules
On this page
Creating a scheduleListing schedulesUpdating a scheduleDeleting a scheduleViewing execution historyManaging via CLIPlan limitsDashboardRun your functions on a recurring schedule using cron expressions. Schedules are useful for periodic tasks like data syncing, report generation, or health checks.
Creating a schedule
curl -X POST https://api.fold.run/schedules \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"function_id": "fn_abc123",
"cron_expression": "0 * * * *"
}'| Field | Type | Required | Description |
|---|---|---|---|
| function_id | string | Yes | Function to trigger |
| cron_expression | string | Yes | Standard 5-field cron (minute hour day month weekday) |
Cron format
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *Common examples:
| Expression | Schedule |
|---|---|
* * * * * |
Every minute |
0 * * * * |
Every hour |
0 0 * * * |
Daily at midnight |
0 9 * * 1-5 |
Weekdays at 9 AM |
*/15 * * * * |
Every 15 minutes |
0 0 1 * * |
First day of each month |
Supported patterns: *, */N (every N), N (exact), N-N (range), N,N (list).
Listing schedules
curl "https://api.fold.run/schedules" \
-H "Authorization: Bearer YOUR_TOKEN"Updating a schedule
Enable/disable or change the cron expression:
curl -X PUT "https://api.fold.run/schedules/fn_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'curl -X PUT "https://api.fold.run/schedules/fn_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cron_expression": "0 */6 * * *"
}'Deleting a schedule
curl -X DELETE "https://api.fold.run/schedules/fn_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"Viewing execution history
See past runs for a schedule, including status and duration:
curl "https://api.fold.run/schedules/sched_abc123/runs?limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"runs": [
{
"id": "run_xyz",
"schedule_id": "sched_abc123",
"function_id": "fn_abc123",
"function_name": "daily-sync",
"status": "success",
"duration_ms": 142,
"error_message": null,
"triggered_at": "2026-03-14T00:00:00Z"
}
]
}Managing via CLI
# List schedules
fold schedules list
# Create a schedule (every hour)
fold schedules create fn_abc123 "0 * * * *"
# Toggle on/off
fold schedules toggle fn_abc123
# View execution history
fold schedules runs sched_abc123
# View last 5 runs
fold schedules runs sched_abc123 --limit 5
# Delete
fold schedules delete fn_abc123Plan limits
| Plan | Max schedules |
|---|---|
| Free | 3 |
| Pro | 50 |
| Scale | 500 |
Creating a schedule beyond your plan limit returns a 403 PLAN_LIMIT_REACHED error. Upgrade your plan to increase the limit.
Dashboard
Manage schedules from app.fold.run/console/schedules in the dashboard.