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

# Invalid Cron Expression

> The cron_expression value is not a valid cron expression

## Error message

```
refresh: Invalid cron expression '{expression}': {detail}
```

## When this error occurs

When `refresh.trigger` is `"cron"`, the `cron_expression` field must contain a valid 5-field cron expression. This error is raised when the expression cannot be parsed.

## Example: request that triggers this error

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": {
    "trigger": "cron",
    "cron_expression": "not a cron"
  }
}
```

## Cron expression format

```
┌───────────── minute (0–59)
│ ┌───────────── hour (0–23)
│ │ ┌───────────── day of month (1–31)
│ │ │ ┌───────────── month (1–12)
│ │ │ │ ┌───────────── day of week (0–7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
```

Supported syntax: `*`, `,`, `-`, `/`, `?`, `L`, `W`, `LW`, `#`, and nicknames (`@daily`, `@hourly`, etc.). All times are UTC.

## How to fix

Provide a valid cron expression:

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": {
    "trigger": "cron",
    "cron_expression": "0 0 * * *"
  }
}
```

Common examples:

| Expression     | Meaning                              |
| -------------- | ------------------------------------ |
| `0 0 * * *`    | Every day at midnight UTC            |
| `0 3 * * 1`    | Every Monday at 03:00 UTC            |
| `*/15 * * * *` | Every 15 minutes                     |
| `0 0 1 * *`    | First day of every month at midnight |
| `0 6 * * 1-5`  | Weekdays at 06:00 UTC                |

If you don't need scheduled refresh, consider `"trigger": "on_update"` or `"trigger": "manual"` instead.
