# Cron expression generator

Build a cron expression from plain choices such as every 15 minutes or weekdays at 08:30, with an explanation.

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

## Inputs

- `schedule` (required, string, one of `every_n_minutes`, `every_n_hours`, `daily`, `weekdays`, `weekly`, `monthly`): The kind of schedule.
- `every` (optional, integer, default `15`, range 1..59): The N for every_n_minutes (1 to 59) or every_n_hours (1 to 23).
- `time` (optional, string, default `"09:00"`): Time of day as HH:MM on a 24-hour clock, for daily, weekdays, weekly and monthly.
- `day_of_week` (optional, string, one of `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, default `"monday"`): The day for a weekly schedule.
- `day_of_month` (optional, integer, default `1`, range 1..31): The day for a monthly schedule.

## Example 1

```json
{"input":{"schedule":"weekdays","time":"08:30"}}
```

Result:

```json
{"expression":"30 8 * * 1-5","explanation":"At 08:30, Monday to Friday."}
```

## Example 2

```json
{"input":{"schedule":"every_n_minutes","every":15}}
```

Result:

```json
{"expression":"*/15 * * * *","explanation":"Every 15 minutes."}
```

## Example 3: A day that not every month has

```json
{"input":{"schedule":"monthly","day_of_month":31,"time":"23:00"}}
```

Result:

```json
{"expression":"0 23 31 * *","explanation":"At 23:00 on day 31 of the month. Months with fewer days are skipped."}
```

**Which time zone does cron use?** The time zone of the machine that runs the job, often UTC on servers. Check before relying on an hour.

**What do the five fields mean?** Minute, hour, day of month, month and day of week, in that order. A star means "every".

**Why is "every 7 minutes" uneven?** Cron counts from minute 0 of each hour, so */7 runs at 0, 7 and so on to 56, then again at 0. Only steps that divide 60 are perfectly even.
