Schedule

The `Schedule` entity.

Definition

TypeScript
interface Schedule {
  id: string;
  workspaceId: string;
  name: string;
  cronExpr: string;
  timezone: string;
  nextRunAt: string;
  lastFiredAt: string | null;
  missedRunPolicy: "skip" | "fire";
  payload: Record<string, unknown> | null;
  enabled: boolean;
  createdBy: string;
  runtimeUserId: string | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstringrequired — Workspace that owns this schedule.
namestringrequired — Human-readable label, e.g. 'Daily report'.
cronExprstringrequired — Standard 5-field cron expression, e.g. '0 9 * * 1-5'. Minimum one-minute resolution.
timezonestringrequired — IANA timezone name used to interpret cronExpr, e.g. 'UTC' or 'Europe/Stockholm'.
nextRunAtstringrequired — ISO-8601 UTC timestamp of the next scheduled fire.
lastFiredAtstring | nullrequired — ISO-8601 UTC timestamp of the most recent fire, or null.
missedRunPolicy"skip" | "fire"required
payloadRecord<string, unknown> | nullrequired
enabledbooleanrequired — When false the schedule is registered but the cron loop skips it.
createdBystringrequired — User who created the schedule.
runtimeUserIdstring | nullrequired — Override the workspace default service user as the actor recorded on schedule.fired events. Null = inherit workspace default. Workspace-admin-only to set; target user must be a member of the workspace.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.