Generated Crontab
{{ crontabLine }}

{{ humanReadableLong }}

{{ parse_warning }}
{{ w }}
Field Value Copy
{{ row.label }} {{ row.value || '—' }}

        

Introduction:

Crontab lines are compact schedules that state when commands should run. A cron schedule generator that mirrors the field logic helps you build expressions you can trust and understand quickly.

Enter minutes, hours, and calendar limits or pick a preset that matches a common interval, then read a plain English summary before copying the line. You can paste an existing schedule to interpret it and bring its parts into view for quick edits.

Results show the five timing fields and the complete line with the command and an optional user. Names for months and weekdays are accepted, so familiar words can stand in for numbers when that improves readability.

When both the day of month and the day of week are restricted, the run time may match either condition in many environments, so confirm behavior with a harmless command first. Keep inputs consistent across edits and prefer exact times for predictable runs.

Use the summary to verify intent, then copy the expression or the full line when it says exactly what you expect.

Technical Details:

Schedules are defined by five quantities observed on a repeating calendar: minute, hour, day of month, month, and day of week. A compact expression is formed from these parts, and a full crontab line appends an optional user and the command to execute.

Computation produces three artifacts from the same inputs: the five‑field expression, a human‑readable description of the timing, and a copy‑ready line. Macros beginning with the at sign represent common schedules without expanding fields in place.

Results should be interpreted as inclusive matches on each field. Names are allowed for months and weekdays, and day of week accepts zero or seven for Sunday. Human text summarizes obvious patterns such as every five minutes or a specific time each day.

Comparisons across edits remain valid when the same command and the same field meanings are used. Advanced calendar nuances outside the accepted tokens are not interpreted by the validator.

E = m,h,dom,mon,dow L = E   [U C]
Symbols and units
Symbol Meaning Unit/Datatype Source
m Minute field Integer 0–59 or pattern Input
h Hour field Integer 0–23 or pattern Input
dom Day‑of‑month field Integer 1–31 or pattern Input
mon Month field Integer 1–12 or JAN–DEC Input
dow Day‑of‑week field Integer 0–7 (0/7=SUN) or SUN–SAT Input
U User column (system crontab style) Username Input
C Command to execute String Input
E Five‑field expression String Derived
L Copy‑ready crontab line String Derived
Worked example
m=0, h=0, dom=*, mon=*, dow=*
E="0 0 * * *"  ,  L="0 0 * * * /usr/local/bin/backup"
Interpretation: every day at 00:00 run the command. If a user is provided, it appears between the expression and the command.

Processing pipeline:

  1. Collect five fields or a macro and the command; user is optional.
  2. If a macro is present, keep the macro token as the expression.
  3. Otherwise, render each field from simple or advanced mode into a token.
  4. Join tokens with spaces to form the five‑field expression.
  5. Build the full line by concatenating expression, optional user, and command.
  6. Compute a human summary for common patterns and simple times.
  7. Validate each field and surface any warnings or errors.

Validation and bounds:

Accepted tokens and limits
Field Type Min Max Step/Pattern Error Text Placeholder
Minute Integer or pattern 0 59 *, list, range (x–y), step */n or x–y/n Empty value; Malformed list; Invalid step; Range out of bounds; Range start > end; Value out of bounds; Unsupported token *,0,30,*/5
Hour Integer or pattern 0 23 *, list, range, step Same set as above *,0,3,*/2
Day of Month Integer or pattern 1 31 *, list, range, step Same set as above 1–31
Month Integer or name 1 12 *, list, range, step; JAN–DEC allowed Same set as above 1–12 or JAN–DEC
Day of Week Integer or name 0 7 *, list, range, step; 0/7=SUN; SUN–SAT allowed Same set as above 0–7 or SUN–SAT

I/O formats and encoding:

Inputs and outputs
Input Accepted Families Output Encoding/Precision Rounding
Five fields or an @‑macro Plain tokens, names for months and weekdays Expression and full crontab line Text; tokens separated by single spaces Not applicable
Paste to parse Macro, five fields, or six fields with user Fields populated; warning on extra lines First non‑blank line only Not applicable
Exports CSV and JSON Copy or download artifacts Text; keys and values serialized Not applicable

Networking & storage behavior:

Processing is client‑only. Copy actions write to the clipboard, and downloads create local CSV or JSON files. No data is transmitted or stored server‑side.

Diagnostics & determinism:

  • Identical inputs produce identical expression, full line, and JSON.
  • Inline warnings appear when both day‑of‑month and day‑of‑week are restricted.
  • Per‑field validation messages explain the first failing token.
  • Human summaries favor common patterns and simple daily times.

Security considerations:

  • Command text is handled locally; avoid pasting secrets you would not want copied verbatim.
  • User detection for six‑field lines relies on a conservative username pattern.

Assumptions & limitations:

  • Five timing fields are supported; seconds are not modeled.
  • Supported macros: @reboot, @hourly, @daily, @weekly, @monthly, @yearly.
  • Accepted tokens are *, lists, ranges, numeric steps, and month or weekday names.
  • Heads‑up 0 or 7 both represent Sunday in the day‑of‑week field.
  • Names are case‑insensitive but validated against three‑letter abbreviations.
  • Unknown special syntax is rejected as an unsupported token.
  • User, MAILTO, SHELL, PATH, TZ, and Comment are recorded in JSON but not inserted into the generated line.
  • Only the first non‑blank pasted line is parsed in single‑item mode.

Edge cases & error sources:

  • Empty field values fail validation.
  • Lists with missing items are malformed.
  • Ranges outside allowed bounds or with start greater than end are rejected.
  • Steps must be positive; zero or negative steps are invalid.
  • Out‑of‑range integers and unknown names fail with “value out of bounds.”
  • Day‑of‑week 7 is accepted and treated the same as 0 for Sunday.
  • Six‑field user detection uses ^[a-z_][a-z0-9_-]*[$]?$; unusual accounts may not match.
  • User detection can be ambiguous when a command’s first token looks like a username.
  • Mixed case names are normalized for checking; display uses the original text.
  • Multiple pasted lines are ignored after the first non‑blank line.

Step‑by‑Step Guide:

The schedule is defined first, then the expression and full line follow from it.

  1. Choose a preset or macro, or fill the five fields by hand.
  2. Use Advanced mode to enter a list, range, or step value.
  3. Optionally paste an existing line to populate fields automatically.
  4. Enter the Command; add a User for system crontab style.
  5. Check the human summary and any warnings for intent and scope.
  6. Copy the expression or the full line when satisfied.

Example: minute 0, hour */2, others * with command /usr/bin/rotate produces 0 */2 * * * /usr/bin/rotate.

Pro tip: parse a known good line, adjust one field, and copy the updated result.

FAQ:

Is my data stored?

No. All processing runs locally, copy and download actions operate on your device, and nothing is sent to a server.

Clipboard and file saves are local operations.
Which names can I use?

Months accept JAN to DEC. Weekdays accept SUN to SAT. Names are case‑insensitive and checked against standard three‑letter forms.

How do I parse an existing line?

Paste a line into the parser. Macros, five fields, and six‑field lines with a user are supported. Only the first non‑blank line is used.

What does the “both restricted” warning mean?

It flags that day‑of‑month and day‑of‑week both limit runs. In many environments the job runs when either condition matches.

Are macros expanded?

No. Macros remain as @reboot, @hourly, @daily, @weekly, @monthly, or @yearly in the expression and full line.

Does it add MAILTO, PATH, or TZ?

No. Those values are captured in JSON exports for documentation. The generated line includes only the expression, an optional user, and the command.

Does it work without a network?

Yes. The generator runs locally and does not make requests.

Troubleshooting:

  • Copy includes only the expression: the command field is blank.
  • User not present in output: the user field is empty or you pasted a five‑field line.
  • Weekday name fails: use three‑letter forms such as MON, TUE, WED.
  • Range rejected: ensure start and end are within bounds and ordered correctly.
  • Step rejected: enter a positive integer after */ or after a range slash.
  • Parse ignored extra lines: only the first non‑blank line is considered.
Parsing failed with “need at least 5 fields”: supply either a macro or five timing fields before the command.

Glossary:

Cron expression
The five‑field string that defines timing.
Macro
A shorthand schedule token beginning with the at sign.
Step
Repeating interval written as */n or x–y/n.
Range
Inclusive start and end written as x–y.
List
Comma‑separated values that all match the field.
User column
The account to run under in system crontab style lines.