# CronSchedule

A schedule that triggers an automation: a cron expression split into fields, in UTC. A field left out means "every" (`*`).

**Kind:** an object, used in requests and responses. In a request it is called `CronScheduleInput`.

## In a request

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `uuid` |  | The schedule's id. |
| `name` | `string \| null` |  | A name for the schedule. Optional. |
| `isEnabled` | `boolean` |  | Whether the schedule triggers the automation. Switch it off to pause it without deleting it. |
| `second` | `string \| null` |  | The cron seconds field. Optional: set it for a six-field expression. |
| `minute` | `string` |  | The cron minutes field, such as `0` or `*/15`. |
| `hour` | `string` |  | The cron hours field, in UTC, such as `7`. |
| `dayOfMonth` | `string` |  | The cron day-of-month field. |
| `month` | `string` |  | The cron month field. |
| `dayOfWeek` | `string` |  | The cron day-of-week field, such as `1-5` for weekdays. |
| `nextOccurrence` | `datetime \| null` |  | When the schedule next triggers, in UTC. Set by Maitento. |

```json
{
  "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "name": "...",
  "isEnabled": false,
  "second": "...",
  "minute": "...",
  "hour": "...",
  "dayOfMonth": "...",
  "month": "...",
  "dayOfWeek": "...",
  "nextOccurrence": "2026-10-26T12:00:00.0000000Z"
}
```

## In a response

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `id` | `uuid` | The schedule's id. |
| `name` | `string \| null` | A name for the schedule. Optional. |
| `isEnabled` | `boolean` | Whether the schedule triggers the automation. Switch it off to pause it without deleting it. |
| `second` | `string \| null` | The cron seconds field. Optional: set it for a six-field expression. |
| `minute` | `string` | The cron minutes field, such as `0` or `*/15`. |
| `hour` | `string` | The cron hours field, in UTC, such as `7`. |
| `dayOfMonth` | `string` | The cron day-of-month field. |
| `month` | `string` | The cron month field. |
| `dayOfWeek` | `string` | The cron day-of-week field, such as `1-5` for weekdays. |
| `nextOccurrence` | `datetime \| null` | When the schedule next triggers, in UTC. Set by Maitento. |

```json
{
  "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "name": "...",
  "isEnabled": false,
  "second": "...",
  "minute": "...",
  "hour": "...",
  "dayOfMonth": "...",
  "month": "...",
  "dayOfWeek": "...",
  "nextOccurrence": "2026-10-26T12:00:00.0000000Z"
}
```

## Where it's used

- [`automations.addSchedule`](https://docs.maitento.com/reference/api/automations.md) (`POST /automated-actions/by-id/{id}/schedules`)
- [`automations.updateSchedule`](https://docs.maitento.com/reference/api/automations.md) (`PUT /automated-actions/by-id/{id}/schedules/{scheduleId}`)
- Inside [`AutomatedAction`](https://docs.maitento.com/reference/types/automated-action.md)
