Generate a crontab line for any schedule

Pick how often a job should run and get the five-field cron line, a plain-English description and the next five run times.

How it works

  1. Choose how often the job should run
  2. Set the time, days or values
  3. Copy the cron line or the full crontab entry

How the crontab generator builds a line

A crontab line is five fields separated by spaces, in this order: minute, hour, day of month, month and day of week. Choose a schedule and the page fills them in for you. Every 15 minutes becomes */15 * * * *, daily at 02:05 becomes 5 2 * * *, and Monday to Friday at 09:30 becomes 30 9 * * 1-5. The minute field takes 0 to 59, the hour field 0 to 23, the day of month 1 to 31, the month 1 to 12 and the day of week 0 to 6, where 0 is Sunday. A star means every value, a comma makes a list, a dash makes a range and */N means every Nth value. Under the cron line you get a crontab entry with /path/to/command added; replace it with your own command, then add the line with crontab -e.

A worked example

Say a report must run on weekdays at 09:30. Choose Weekly, keep Monday to Friday switched on and set the time to 09:30. The page gives 30 9 * * 1-5 and reads it as At 09:30, on Monday through Friday. If today is Thursday 15 October 2026 at 10:00, the next run is Friday 16 October 2026 at 09:30, then Monday 19 October. A second example: Monthly on days 1,15 at 00:00 gives 0 0 1,15 * *, which runs on the 1st and the 15th at midnight. Three or more days in a row, such as Monday to Friday, are written as a range; other days are written as a list, so Saturday and Sunday become 0,6.

Custom schedules, field by field

Choose Custom to set each field on its own. For every field you pick Every, List, Range or Step. List takes values such as 0,30. Range takes two values such as 9-17. Step takes one number: 5 in the minute field means */5, every fifth minute. Month and weekday names such as JAN or MON are accepted in the list and range boxes. Each box is checked against the allowed values of its field, so 17-9 or a minute of 75 is reported next to the box and no line is made. When you switch to Custom the boxes already hold an example, */15 9-17 * * 1-5, which is every 15 minutes between 09:00 and 17:59 on weekdays, built from a step, a range and a list.

Rules that surprise people

If you restrict both day of month and day of week, cron runs the job when either one matches, not only when both do, so 0 0 13 * 5 runs on every 13th and on every Friday. The page shows a note when your line does this. A step restarts at the start of its field: */45 in the minute field runs at minute 0 and minute 45 of every hour, so the last gap in each hour is only 15 minutes, and the page says so. A job on day 31 skips months that have fewer days. Standard five-field cron has no value for the last day of a month, and the page cannot make one.

What the next run times mean

The five run times are worked out from the clock of the device you are using, in its local time, with no time zone shown. A job really runs on the clock of the machine that holds its crontab, which may be set to another zone. Daylight saving changes are not modelled, so a job set for an hour that is skipped or repeated in spring or autumn may behave differently from the list. Lines with seconds, such as the six-field forms some schedulers use, are not made here. Nothing you choose is saved or uploaded; the page works in this tab.

Frequently asked questions

How do I run a cron job every 5 minutes?

Choose Every N minutes and enter 5. The line is */5 * * * *, which runs at minutes 0, 5, 10 and so on up to 55 of every hour. Because 60 divides evenly by 5, the gaps are always exactly 5 minutes.

What is the cron expression for every day at midnight?

Choose Daily and set the time to 00:00. The line is 0 0 * * *: minute 0 of hour 0, every day, every month. Use 12:00 for noon, which gives 0 12 * * *. Cron uses a 24-hour clock, so there is no AM or PM.

How do I schedule a cron job for weekdays only?

Choose Weekly and keep Monday to Friday on. The day-of-week field becomes 1-5, so 30 9 * * 1-5 runs at 09:30 from Monday to Friday. Switch Saturday and Sunday on and the field becomes a star, which means every day.

Why does my cron job run on days I did not choose?

If both day of month and day of week are set, cron runs the job when either one matches. 0 0 13 * 5 runs on every 13th and on every Friday, not only on Friday the 13th. To get only Friday the 13th, run it every Friday and test the date in the script.

How do I run a cron job on the last day of the month?

Standard five-field cron cannot say it. A common way is to run the job on days 28 to 31 with 0 0 28-31 * * and have the script exit unless tomorrow is the 1st. Choose Custom and set Day of month to a range to get that line.

Is anything I enter uploaded or saved?

No. The text is processed in your browser and not uploaded. Your choices live only in this tab and are not saved, so they are gone when you close or reload the page.