1. Home
  2. Developer
  3. Cron Expression Generator

Cron Expression Generator

Pick options and get a cron expression with its next run times.

For every format and option in one place, use Server Config Generators →

Runs in your browser · No upload
Common schedules
Several times must share the same minute, e.g. 09:30, 18:30
Cron expression
0 9 * * *
Meaning: Every day at 09:00

Next 5 run times

Calculating…

See this expression in detail in the Cron Expression Parser

The command placed after the schedule. Do not write passwords or tokens in it.

Snippets for each place

crontab line
0 9 * * * /opt/scripts/job.sh >> /var/log/job.log 2>&1
GitHub Actions
on: schedule: - cron: '0 9 * * *' # always UTC
Kubernetes CronJob
spec: schedule: "0 9 * * *" timeZone: "UTC" # Kubernetes 1.27 or newer
systemd timer
OnCalendar=*-*-* 09:00:00
cron runs in the server time zone, while GitHub Actions is always UTC.
Review the generated expression and command before using them in production. Check the next run times table against the time you intended.

Your input is processed in this browser and never sent to a server.

How to use

  1. Press a common schedule button or pick the repeat type yourself: every N minutes, every N hours, daily, weekly, monthly, yearly or custom per field.
  2. Enter the values for that type (interval, time, days, date). Times use 24-hour format such as 09:00.
  3. The cron expression and a plain-language explanation appear at the top. Switch the time zone and check that the next 5 run times are what you intended.
  4. Enter the command to run and you get snippets for a crontab line, GitHub Actions, a Kubernetes CronJob and a systemd timer.

Expressions it builds

Choice Expression Meaning
Every 5 minutes */5 * * * * Minutes 0, 5, 10 … 55 of every hour
Every 6 hours at minute 0 0 */6 * * * 00:00, 06:00, 12:00, 18:00
Daily at 09:00 0 9 * * * Every day at 9 AM
Daily at 09:30 and 18:30 30 9,18 * * * Twice a day
Weekdays at 09:00 0 9 * * 1-5 Monday through Friday
Weekend at 08:00 0 8 * * 0,6 Sunday and Saturday
1st of the month at 00:00 0 0 1 * * Midnight on the first day
Jan 1st at 00:00 0 0 1 1 * Midnight on New Year’s Day

The field order is minute hour day month weekday, and 0 is Sunday for the weekday. The explanation and next run times use the same calculation logic as the Cron Expression Parser, so pasting the result there gives the same answer.

Pitfalls it warns about

  • Intervals that do not divide evenly: */7 * * * * is not every 7 minutes; it runs at minutes 0, 7, 14 … 56 of each hour and then again at 0, only 4 minutes after 56. Hours behave the same way: */5 for hours runs at 0, 5, 10, 15 and 20 and then again at midnight. A warning is shown.
  • Days after the 28th: 0 0 31 * * runs only in months that have a 31st. Cron has no “last day of the month”, so people run on days 28 to 31 and check inside the script whether tomorrow is the 1st.
  • Day and weekday together: 0 0 13 * 5 means “the 13th or a Friday”, not “the 13th that is a Friday”.
  • Different minutes in one line: one cron line cannot express times with different minutes, such as 09:30 and 18:00. Make one line per time.
  • Time zones: cron runs in the server’s time zone, while GitHub Actions schedule is always UTC. To run on weekdays at 9 AM Korea time (00:00 UTC), GitHub Actions needs 0 0 * * 1-5.
  • GitHub Actions frequency: schedules more frequent than every 5 minutes are not guaranteed and may be delayed under load. Such schedules trigger a warning.

Where to paste it

  • crontab: put the expression and command on one line in crontab -e. A % inside the command is a newline for cron, so it is converted to \% automatically. Redirecting output with >> file 2>&1 is a good habit.
  • GitHub Actions: add - cron: 'expression' under on.schedule in the workflow.
  • Kubernetes CronJob: use the same five fields in spec.schedule; on 1.27 or newer you can also set timeZone.
  • systemd timer: the same schedule is converted to an OnCalendar= value. Weekdays at 09:00 is Mon..Fri *-*-* 09:00:00. To write the service file too, use the systemd Service Generator.

Good to know

  • Review the generated expression and command before using them in production. Do not write passwords or tokens in the command; read them from environment variables or a separate file.
  • For date and time conversion, see the Timestamp Converter and the Time Zone Converter; for script file permissions, the chmod Calculator.

Frequently asked questions

How do I write every 5 minutes in cron?

*/5 * * * *. In this tool, choose “Every N minutes” and enter 5.

How do I run something every day at 9 AM?

0 9 * * *. If the server runs in UTC, 9 AM Korea time becomes 0 0 * * *. Check the next run times with the time zone selector.

Can I run on the last day of every month?

Standard cron has no last-day notation. A common approach is 0 0 28-31 * * and then checking in the script whether tomorrow is the 1st.

What if my cron job does not run?

Cron has a short PATH, so use absolute paths in the command, make sure the script is executable and log its output and errors. grep CRON /var/log/syslog shows the execution records.

Is my input sent to a server?

No. The expression is built in your browser only.

Your input is processed in this browser and never sent to a server.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.