# Cron expression explainer

Explain a cron expression in plain English, for example "At 09:00 on Monday to Friday".

- Endpoint: `POST https://setget.net/v1/tools/cron-explain` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `cron-explain`
- Page: https://setget.net/tools/cron-explain

## Inputs

- `expression` (required, string): A five-field cron expression or a macro such as @daily.

## Example 1

```json
{"input":{"expression":"0 9 * * 1-5"}}
```

Result:

```json
{"expression":"0 9 * * 1-5","text":"At 09:00 on Monday to Friday.","fields":{"minute":[0],"hour":[9],"day_of_month":"any","month":"any","day_of_week":[1,2,3,4,5]},"day_rule":"day_of_week","macro":null}
```

## Example 2: Steps, ranges and names

```json
{"input":{"expression":"*/15 9-17 * JAN,JUL MON"}}
```

Result:

```json
{"expression":"*/15 9-17 * JAN,JUL MON","text":"Every 15 minutes, during hours 9 to 17 on Monday in January and July.","fields":{"minute":[0,15,30,45],"hour":[9,10,11,12,13,14,15,16,17],"day_of_month":"any","month":[1,7],"day_of_week":[1]},"day_rule":"day_of_week","macro":null}
```

## Example 3: A macro

```json
{"input":{"expression":"@monthly"}}
```

Result:

```json
{"expression":"0 0 1 * *","text":"At 00:00 on day 1 of the month.","fields":{"minute":[0],"hour":[0],"day_of_month":[1],"month":"any","day_of_week":"any"},"day_rule":"day_of_month","macro":"@monthly"}
```

**What happens when both day fields are set?** Standard cron runs when either one matches. "0 0 13 * 5" runs on the 13th and also on every Friday, not only on Friday the 13th. The exception is a day field that starts with *, such as */2: then both must match.

**Which syntax is supported?** Five fields with values, lists (1,15), ranges (1-5), steps (*/10, 10-40/5), month and weekday names (JAN, MON), and the macros @yearly, @monthly, @weekly, @daily and @hourly. Seconds, years, L, W and # are not supported.
