Cron expression explainer
Explain a cron expression in plain English, for example "At 09:00 on Monday to Friday".
Input
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/cron-explain \
-H 'Content-Type: application/json' \
-d '{"input":{"expression":"0 9 * * 1-5"}}'
import json, urllib.request
body = {'input': {'expression': '0 9 * * 1-5'}}
request = urllib.request.Request("https://setget.net/v1/tools/cron-explain", 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/cron-explain", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"expression":"0 9 * * 1-5"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "cron-explain",
"input": {
"expression": "0 9 * * 1-5"
}
}
{
"input": {
"expression": "0 9 * * 1-5"
}
}
Endpoint: POST /v1/tools/cron-explain. Over MCP: run_tool with slug: "cron-explain".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
expression |
string | yes | A five-field cron expression or a macro such as @daily. |
Examples
Input
{
"expression": "0 9 * * 1-5"
}Result
{
"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
}Steps, ranges and names
Input
{
"expression": "*/15 9-17 * JAN,JUL MON"
}Result
{
"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
}A macro
Input
{
"expression": "@monthly"
}Result
{
"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"
}Questions
- 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.
Related tools
- Cron next run timesList the next run times of a cron expression after a given moment, in the time zone you choose.
cron-next-runs - Current time in any time zoneGet the current date and time in one or more time zones, with Unix time and UTC offset.
time-now - Duration parser and formatterTurn a duration such as "1h 30m", "PT1H30M" or "1:30:00" into seconds, ISO 8601 and plain words.
duration-parse - Add or subtract time from a dateAdd or subtract years, months, weeks, days, hours and minutes from a date and get the resulting date.
date-add - Age calculatorWork out an exact age in years, months and days on a given date, plus the next birthday.
age-calculator - Aspect ratio calculatorSimplify a width and height to a ratio such as 16:9, and scale to a new width or height.
aspect-ratio