> ## Documentation Index
> Fetch the complete documentation index at: https://docs.colossal.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduled

> Start an automation on a cron schedule or a recurring interval instead of a commerce event.

Scheduled events run automations at regular times rather than in response to commerce activity. Use them for recurring tasks like daily reports, weekly cleanup, or periodic syncs.

This page covers the schedule object itself. It goes under `schedule_config` in the [automation definition](/automations/definition), alongside `"trigger_type": "SCHEDULE"`.

## Schedule types

### Cron

Run at specific times using a cron expression:

```json theme={null}
{
  "schedule_type": "cron",
  "cron_expression": "0 9 * * MON-FRI"
}
```

Standard 5-field cron format: `minute hour day-of-month month day-of-week`.

| Example           | Schedule                            |
| ----------------- | ----------------------------------- |
| `0 9 * * *`       | Every day at 9:00 AM                |
| `0 9 * * MON-FRI` | Weekdays at 9:00 AM                 |
| `0 */2 * * *`     | Every 2 hours                       |
| `0 0 1 * *`       | First day of each month at midnight |

### Interval

Run at a fixed interval in seconds:

```json theme={null}
{
  "schedule_type": "interval",
  "interval_seconds": 3600
}
```

<Note>
  The minimum interval is 60 seconds.
</Note>

## Configuration

| Field              | Type                     | Required        | Description                       |
| ------------------ | ------------------------ | --------------- | --------------------------------- |
| `schedule_type`    | `"cron"` or `"interval"` | Yes             | Type of schedule                  |
| `cron_expression`  | `string`                 | When `cron`     | Standard cron expression          |
| `interval_seconds` | `integer`                | When `interval` | Seconds between runs (minimum 60) |

## Validation

* `cron_expression` is required when `schedule_type` is `"cron"`
* `interval_seconds` is required when `schedule_type` is `"interval"`
* Interval must be at least 60 seconds

## Schedule info

Once a scheduled automation is created, you can query its next run times through the GraphQL API. The `ScheduleInfo` type returns its upcoming run times.
