Cron is a time-based job scheduler built into Unix-like operating systems including Linux and macOS. It lets you automate repetitive tasks, running backups at midnight, clearing temporary files every Sunday, sending reports every Monday morning. The catch? You have to express your schedule using a cryptic five-field syntax that nobody memorizes. That string 0 5 * * 1 means “5:00 AM every Monday,” but good luck remembering that six months from now when you need to change it.

This generator solves a simple problem: you know when you want something to run, but you don’t want to look up the syntax every time. Instead of Googling “cron every 15 minutes” for the hundredth time, you can click a few buttons and get the exact expression you need. The tool also works in reverse—paste an existing cron expression and see a plain English explanation of what it does. That’s useful when you inherit someone else’s server and find a dozen cron jobs with no documentation.

Also, try our YAML ⇄ JSON Converter


How to Use This Crontab Generator

Natural Language Mode (Recommended for beginners)

  1. Select how often the job should run: Every Minute, Hourly, Daily, Weekly, Monthly, or Yearly.
  2. Pick the time using the hour and minute dropdowns.
  3. For weekly schedules, click the days you want (Mon, Tue, Wed, etc.).
  4. For monthly or yearly schedules, select the day of the month.
  5. Copy the generated expression from the right panel.

Advanced Mode

  1. Switch to the Advanced tab if you need precise control over individual fields.
  2. Each field (minute, hour, day, month, day of week) has its own editor.
  3. Choose from Any, Specific value, Step interval, Range, or multiple selections.
  4. The expression updates in real time as you make changes.

Explain Mode

  1. Switch to the Explain tab.
  2. Paste any cron expression into the input field.
  3. Read the human-friendly translation that appears below.

Cron Expression Format

Every cron expression has five fields separated by spaces. Here’s what each position means:

PositionFieldAllowed ValuesSpecial Characters
1Minute0–59* , – /
2Hour0–23* , – /
3Day of Month1–31* , – /
4Month1–12* , – /
5Day of Week0–6 (Sun=0)* , – /

Special character meanings:

  • * matches any value
  • , separates multiple values (e.g., 1,3,5)
  • - defines a range (e.g., 1-5 means Monday through Friday)
  • / specifies intervals (e.g., */15 means every 15 units)

Common Cron Schedule Examples

ScheduleExpressionExplanation
Every minute* * * * *Runs 60 times per hour
Every 5 minutes*/5 * * * *Runs 12 times per hour
Every hour at minute 00 * * * *Runs 24 times per day
Daily at midnight0 0 * * *Runs once at 12:00 AM
Daily at 6 AM0 6 * * *Runs once at 6:00 AM
Every Monday at 9 AM0 9 * * 1Weekly, start of business
Weekdays at 9 AM0 9 * * 1-5Mon–Fri, skips weekends
First of every month0 0 1 * *Monthly at midnight on the 1st
Every 6 hours0 */6 * * *Runs at 12 AM, 6 AM, 12 PM, 6 PM
Twice daily (9 AM & 6 PM)0 9,18 * * *Morning and evening

Linux Cron Commands You Should Know

Once you have your expression, here’s how to use it on a Linux or macOS system:

  • Edit your crontab: crontab -e opens your personal cron file in a text editor.
  • List current jobs: crontab -l shows all scheduled tasks for your user.
  • Remove all jobs: crontab -r deletes your entire crontab (use carefully).
  • Edit another user’s crontab: sudo crontab -u username -e (requires root access).

A typical crontab entry looks like this:

0 6 * * * /home/user/scripts/backup.sh

This runs backup.sh every day at 6:00 AM.


Frequently Asked Questions

What time zone does cron use?
Cron uses your server’s system time zone. Run the date command to check what time your server thinks it is. If your server is in UTC but you’re scheduling for local time, you’ll need to convert manually or change the server’s time zone.

Why didn’t my cron job run?
Common causes include: incorrect file permissions on your script, missing environment variables (cron runs with a minimal environment), or the script path isn’t absolute. Check /var/log/syslog or /var/log/cron for error messages.

What’s the difference between crontab and cron.d?
Your personal crontab (edited with crontab -e) is for user-specific jobs. System-wide jobs go in /etc/crontab or as individual files in /etc/cron.d/. The system files have an extra field for specifying which user should run the command.

Can I run a job every 90 minutes?
Not directly. Cron works in fixed intervals within each field. For 90-minute intervals, you’d need to schedule multiple jobs or use a different scheduler. A workaround is running every 30 minutes and having your script check whether it should actually execute.

Does day of month AND day of week both have to match?
No, they’re combined with OR logic. If you set day of month to 15 and day of week to Monday, the job runs on every 15th and every Monday, not just Mondays that fall on the 15th.

Leave a Comment

Your email address will not be published. Required fields are marked *