Skip to content

Crontab generator: build and read cron expressions

The crontab generator builds a cron expression from minute, hour, day of the month, month and day of the week — or reads a pasted expression: in words, field by field and with the next five executions in the time zone you choose.

The calculation is done in your browser; your inputs do not leave it.

Default
30 2 * * 1-5
At 02:30, from Monday to Friday.
Fields
5
Minute, hour, day, month, day of the week
Smallest interval
1 min
crontab does not support seconds
Time zones
6
UTC and those of the locations

Build and read cron expression

Write the expression as a whole, field by field or choose a template. The sentence, the fields and the next executions follow every input.

Five fields separated by spaces or a shorthand like @daily.

Field by field

0–59

0–23

1–31

1–12, jan–dec

0–7, sun–sat

Templates

In words

At 02:30, from Monday to Friday.

Next executions

Your browser calculates the next executions as soon as the page is loaded.

Local time of the selected time zone. On the day of the change to daylight saving time, one hour is missing; how a cron service handles this depends on its implementation.

Line for crontab -e

30 2 * * 1-5 /opt/app/backup.sh

Enter the command with the full path; cron starts it without your login environment.

Read as

minute
3030
Hour
22
Day of month
*every day
Month
*every month
Day of the week
1-5Monday to Friday

How crontab reads an expression

Five fields, separated by spaces. A command runs if the minute, hour and month match, along with the day: day of the month or day of the week, if both are set.

The five fields in their order, from left to right, with the allowed values.
FieldValues
1minute0 to 59
2Hour0 to 23
3Day of month1 to 31
4Month1 to 12 or jan to dec
5Day of the week0 to 7 or sun to sat; 0 and 7 are Sunday
*Any value of the field
* in the hour field: every hour
,List of individual values
0,30 in the minute field: on the hour and half past the hour
-Range, both ends included
1-5 in the day of the week field: Monday to Friday
/Step value over a range or over *
*/10 in the minute field: every ten minutes
Examples: expression and meaning, read by the same function as in the calculator above.
ExpressionMeaning
*/5 * * * *Every 5 minutes.
0 * * * *Hourly at minute 0.
0 3 * * *Daily at 03:00.
30 2 * * 1-5At 02:30, from Monday to Friday.
*/15 9-17 * * 1-5Every 15 minutes from 09:00 to 17:45, from Monday to Friday.
0 0 1 * *At 00:00, on day 1 of the month.
0 0 1 1 *At 00:00, on day 1 of the month, in January.
0 4 * * 6,0At 04:00, weekly on Saturday and Sunday.
0 0 1 * 1At 00:00, on day 1 of the month or weekly on Monday.
Shortcuts and the five fields they stand for.
Shortcutstands for
@rebootonce when the cron service starts
@yearly0 0 1 1 *
@annually0 0 1 1 *
@monthly0 0 1 * *
@weekly0 0 * * 0
@daily0 0 * * *
@midnight0 0 * * *
@hourly0 * * * *

If both the day of the month and the day of the week are restricted, it is enough if one of the two matches: 0 0 1 * 1 runs on the first of every month and on every Monday. If one of the two fields starts with *, even as */2, both must match.

Characters such as L, W, # and ? come from other schedulers with six or seven fields; crontab does not recognise them and rejects the expression. There are also no seconds: the smallest unit is the minute.

Time zones of ENTRONYX CLOUD locations

Cron calculates in the system's time zone. If you do not set a server to UTC, you schedule using the local time of its location — and with daylight saving time.

Locations with time zone and offset to UTC, in winter and, where applicable, in daylight saving time.
LocationTime zoneOffset to UTC
Frankfurt am MainGermanyEurope/BerlinUTC+1, daylight saving time UTC+2
HelsinkiFinlandEurope/HelsinkiUTC+2, daylight saving time UTC+3
LondonUnited KingdomEurope/LondonUTC, daylight saving time UTC+1
Northern VirginiaUSAAmerica/New_YorkUTC−5, daylight saving time UTC−4
New York/New JerseyUSAAmerica/New_YorkUTC−5, daylight saving time UTC−4
SingaporeSingaporeAsia/SingaporeUTC+8

On VPS and Cloud Servers, you sign in via SSH key and enter cronjobs yourself. In Kubernetes, the same task is called CronJob and uses the same five fields.

Frequently asked questions about Cron and crontab

Seven questions about syntax, time zone and short forms. The examples are read by the same function as the calculator.

Can't find your question? The calculator above shows the full calculation for every input.

What does */15 mean in the minute field?

The slash indicates a step value: */15 means every 15 minutes starting from minute 0, i.e. at minutes 0, 15, 30 and 45. With a range in front, such as 10-59/15, counting starts at 10.

Check custom expression

How do I create a cronjob?

Use crontab -e to open the table of the logged-in user; each line consists of the five time fields and the command. The crontab -l command shows the entered lines.

What happens if day of the month and day of the week are set?

If both fields are restricted, it is enough if one matches: 0 0 1 * 1 runs on the first of every month and on every Monday. If one of the two fields starts with *, both must match.

Is 0 or 7 Sunday?

Both: crontab accepts 0 and 7 for Sunday, Monday is 1. Instead of numbers, you can also use the English abbreviations mon to sun and jan to dec.

In which time zone do cronjobs run?

In the system's time zone, which is UTC on many servers. The calculator shows the next executions in the time zone you select, and skips times that do not exist on the day of the switch to daylight saving time.

Time zones of the locations

What does @reboot mean?

The shorthand @reboot runs the command once when the cron service starts, usually after booting. Other shorthands are @hourly, @daily, @weekly, @monthly and @yearly.

Can cron start a command every second?

No, the smallest unit of crontab is the minute. For shorter intervals, a loop in the script or a system timer is required.

A server for your cronjobs

On VPS you work with root access via SSH, on Cloud Servers with your SSH key. The other calculators help with permissions, storage and availability.

Fields
5
Smallest unit
minute
Sunday
0 or 7
Short form daily
@daily