Cron expression generator

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

Input

The kind of schedule.
The N for every_n_minutes (1 to 59) or every_n_hours (1 to 23).
Time of day as HH:MM on a 24-hour clock, for daily, weekdays, weekly and monthly.
The day for a weekly schedule.
The day for a monthly schedule.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/crontab-generate \
  -H 'Content-Type: application/json' \
  -d '{"input":{"schedule":"weekdays","time":"08:30"}}'
import json, urllib.request

body = {'input': {'schedule': 'weekdays', 'time': '08:30'}}
request = urllib.request.Request("https://setget.net/v1/tools/crontab-generate", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/crontab-generate", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"schedule":"weekdays","time":"08:30"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "crontab-generate",
  "input": {
    "schedule": "weekdays",
    "time": "08:30"
  }
}
{
  "input": {
    "schedule": "weekdays",
    "time": "08:30"
  }
}

Endpoint: POST /v1/tools/crontab-generate. Over MCP: run_tool with slug: "crontab-generate". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
schedule string yes The kind of schedule. One of: every_n_minutes, every_n_hours, daily, weekdays, weekly, monthly.
every integer no The N for every_n_minutes (1 to 59) or every_n_hours (1 to 23). Default: 15. From 1 to 59.
time string no Time of day as HH:MM on a 24-hour clock, for daily, weekdays, weekly and monthly. Default: "09:00".
day_of_week string no The day for a weekly schedule. One of: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default: "monday".
day_of_month integer no The day for a monthly schedule. Default: 1. From 1 to 31.

Examples

Input
{
  "schedule": "weekdays",
  "time": "08:30"
}
Result
{
  "expression": "30 8 * * 1-5",
  "explanation": "At 08:30, Monday to Friday."
}
Input
{
  "schedule": "every_n_minutes",
  "every": 15
}
Result
{
  "expression": "*/15 * * * *",
  "explanation": "Every 15 minutes."
}

A day that not every month has

Input
{
  "schedule": "monthly",
  "day_of_month": 31,
  "time": "23:00"
}
Result
{
  "expression": "0 23 31 * *",
  "explanation": "At 23:00 on day 31 of the month. Months with fewer days are skipped."
}

Questions

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.