Automation

Scheduler System

Cron-based task scheduler for recurring workflows, background jobs, and time-triggered automations.

How the Scheduler Works

The Scheduler is a service that evaluates cron expressions and creates workflow tasks at specified intervals. It runs as part of the backend process and uses the same task queue as manual executions.

Cron Expressions

Define schedules using standard cron syntax (minute, hour, day, month, weekday).

Recurring Execution

Workflows are automatically queued and executed based on the schedule.

Timezone Support

All schedules respect the configured timezone for accurate triggering.

Creating a Scheduled Workflow

Attach a cron schedule to any workflow definition. The scheduler will automatically create execution instances at the specified times.

schedule-request.json
{
  "name": "Daily Report Generator",
  "workflowId": "wf_123",
  "cron": "0 9 * * *",
  "timezone": "America/New_York",
  "enabled": true,
  "taskInput": {}
}

Schedule API

POST/api/schedules

Create a new schedule. Requires name, workflowId, and cron.

GET/api/schedules

List all schedules for the authenticated user.

GET/api/schedules/:id

Get schedule details including next execution time.

PUT/api/schedules/:id

Update a schedule (cron, timezone, enabled, etc.).

DELETE/api/schedules/:id

Delete a schedule.

Notes

  • The scheduler validates that the linked workflow has steps before creating a schedule.
  • Ownership is enforced: only the workflow owner can create or modify schedules.
  • Disabled schedules are skipped by the scheduler loop.