---
title: "Schedule"
description: "The `Schedule` entity."
section: "Reference"
group: "Types"
order: 178
---

## Definition

```ts
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

| Field             | Type                              | Notes                                                                                                                                                                                                                    |
| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`              | `string`                          | `readonly` `required`                                                                                                                                                                                                    |
| `workspaceId`     | `string`                          | `required` — Workspace that owns this schedule.                                                                                                                                                                          |
| `name`            | `string`                          | `required` — Human-readable label, e.g. 'Daily report'.                                                                                                                                                                  |
| `cronExpr`        | `string`                          | `required` — Standard 5-field cron expression, e.g. '0 9 \* \* 1-5'. Minimum one-minute resolution.                                                                                                                      |
| `timezone`        | `string`                          | `required` — IANA timezone name used to interpret cronExpr, e.g. 'UTC' or 'Europe/Stockholm'.                                                                                                                            |
| `nextRunAt`       | `string`                          | `required` — ISO-8601 UTC timestamp of the next scheduled fire.                                                                                                                                                          |
| `lastFiredAt`     | `string \| null`                  | `required` — ISO-8601 UTC timestamp of the most recent fire, or null.                                                                                                                                                    |
| `missedRunPolicy` | `"skip" \| "fire"`                | `required`                                                                                                                                                                                                               |
| `payload`         | `Record<string, unknown> \| null` | `required`                                                                                                                                                                                                               |
| `enabled`         | `boolean`                         | `required` — When false the schedule is registered but the cron loop skips it.                                                                                                                                           |
| `createdBy`       | `string`                          | `required` — User who created the schedule.                                                                                                                                                                              |
| `runtimeUserId`   | `string \| null`                  | `required` — 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. |
| `createdAt`       | `string`                          | `readonly` `required` — ISO-8601 timestamp of creation.                                                                                                                                                                  |
| `updatedAt`       | `string`                          | `readonly` `required` — ISO-8601 timestamp of the last update.                                                                                                                                                           |
