Developer tools · Crontab generator
Reading a cron expression aloud: how */5 9-17 * * 1-5 becomes words
· How it works
cron code-review developer-workflow
Translating an expression into English is a mechanical process once you know the order. This post gives the reading algorithm, applies it to tricky examples, and shows how a generator's explanation helps you check.
A crontab in the diff you cannot review — five fields with steps and ranges, and no comment explaining them
A five-token expression in a pull request is executable policy compressed into punctuation. Reviewers who recognize the shape but cannot say the schedule aloud are likely to miss an inclusive endpoint, a misplaced step or the special relationship between the two day fields. Translation is therefore a correctness check, not cosmetic documentation.
ToolAcre derives its sentence from the parsed object used by warnings and previews. Paste only the five fields, leaving the command and secrets outside. If the generated wording differs from the author’s comment, pause the review and resolve intent before the expression is installed anywhere.
Read the day fields first — day of week and month tell you which days, then minute and hour tell you when
Calendar scope is easiest to establish before clock detail. Month and weekday reveal which portions of the year or week are eligible; day of month may add another calendar condition; hour and minute then place runs within matching dates. This reading order is for human review, while the expression’s stored positional order remains minute first.
Always ask whether both day fields are restricted. If so, ToolAcre joins them with “or” and emits a warning. Reading them casually as adjacent AND filters changes the schedule. A wildcard in one day field removes that ambiguity and lets the other field act as the sole day restriction.
Translating each token — * as 'every', a number as 'at', a range as 'from–to', a step as 'every N starting at'
A star means every allowed value in that position. A number selects one value. A hyphen includes every value between its endpoints. Commas combine items, and a slash samples every nth value from the start of a wildcard, range or bare start. The field’s own minimum determines where a wildcard step begins.
Names are accepted for months and weekdays without regard to case, including ranges such as `JAN-MAR` and `MON-FRI`. Sunday may be written 0 or 7 and is normalized to 0. Description code converts contiguous expanded values into “through” wording and noncontiguous values into a readable list.
Worked example: the tool describes the selected hours, while expanded minute values identify the final run
`*/5 9-17 * * 1-5` selects minute values 0 through 55 in steps of five, hours 9 through 17 and weekdays Monday through Friday. The tool describes minute stepping across the selected hour span. Expanding the values shows that the final candidate in the included 17 hour is 17:55.
That last candidate is often missed when “9-17” is paraphrased as a business-day boundary. Cron selects complete hour values, then combines them with all selected minutes. If the intent ends at 17:00, the expression cannot be reviewed as correct merely because the words “nine to five” sound familiar.
Worked example: 0 0 1,15 * 3 — reading the day-field OR rule out loud so it is not missed
Now read `0 0 1,15 * 3`. Midnight is selected, day of month is the first or fifteenth, and weekday is Wednesday. Because both day fields are restricted, the calendar condition is the first or fifteenth of each month OR every Wednesday. It is not “Wednesday when the date is 1 or 15.”
ToolAcre’s warning makes that union prominent, and its description inserts the word “or.” The next-run preview gives concrete dates for the selected zone. Review all three outputs because a fluent sentence alone may still conceal that the underlying requirement was an intersection the dialect cannot directly express.
Store an intent comment only after checking it against the expression
A comment above an expression can preserve intent, but it can also preserve an old lie after the fields change. Generate or manually reconstruct the sentence from the current tokens during review. If an edit changes `0` to `*/5`, update the comment only after confirming the expanded minute set and final run.
Prefer a comment that states the wall-clock zone assumption as well as frequency. The expression contains no time-zone field, while ToolAcre’s preview asks the reviewer to choose one. That note helps another person reproduce the same list without implying that the browser choice configures the eventual scheduler.
Six- and seven-field grammars are refused, not translated
The parser requires exactly five fields. A six-field input receives a specific explanation about a leading seconds style; longer forms are not interpreted. ToolAcre also has no year field. Therefore the plain-English algorithm in this article applies only to the repository’s five-field grammar.
Do not strip a field from Quartz, Spring or another product until the remaining text validates. Unsupported operators can carry essential meaning. Translation requires documentation for both systems, while this generator supplies evidence only for its own accepted values, names, ranges, lists, steps, wildcards and aliases.
Takeaway: every expression has a sentence — and the Crontab generator produces that sentence so you can compare it with the intent
Every supported expression can be expanded into finite field values and a calendar sentence. Reading those values exposes edge candidates that informal phrases omit. It also forces the day-field OR rule into the conversation before the schedule reaches an operational host.
For review, paste the expression, compare the generated description with the stated requirement, inspect warnings and sample upcoming times. Keep the resulting comment beside the line, but treat the parsed expression as the executable source. The generator explains schedule intent; it does not attest to a command or install it.