Skip to main content

schedules.json

Defined at the app root. Configures workflows that run automatically on a recurring schedule.
{
  "schedules": [
    {
      "name": "daily-order-sync",
      "cron": "0 3 * * *",
      "timezone": "UTC",
      "skipIfRunning": true,
      "workflow": "./src/server/workflows/syncOrders.ts",
      "params": {
        "orgId": "org_abc123"
      }
    }
  ]
}

Fields

FieldRequiredDescription
nameYesUnique schedule identifier
cronYesCron expression
timezoneNoTimezone (default: "UTC")
skipIfRunningNoSkip if previous run is still active
workflowYesPath to the workflow file
paramsNoVariable values passed to the workflow

Common cron expressions

ExpressionSchedule
0 * * * *Every hour
0 */6 * * *Every 6 hours
0 3 * * *Daily at 3:00 AM
0 0 * * 1Weekly on Monday at midnight
0 0 1 * *Monthly on the 1st at midnight
*/15 * * * *Every 15 minutes

Build-time validation

  • Cron expressions are syntactically valid
  • Workflow file paths resolve to exported workflow definitions
  • Parameter values match the workflow’s variable definitions
  • Schedule names are unique