Developer Tools

Cron Expression Generator

Build a cron expression with an intuitive 5-field builder. Choose preset schedules or customize each field.

Quick presets

0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat

Cron expression

0 9 * * 1-5UTC

at the top of the hour at 9:00 AM Monday through Friday

Minute0
Hour9
Day of month*
Month*
Day of week1-5

Cron expressions specify schedules using 5 fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6). Use * for every, or specific numbers. Ranges like 1-5 and lists like 1,3,5 are supported.

What is the Cron Expression Generator?

A cron expression is a standardised string used by Unix-like operating systems to schedule automated tasks at specific times or intervals. It consists of five or six fields (minute, hour, day, month, day-of-week, and optionally second) where each field can be a number, range, list, or wildcard. Most system administrators use cron expressions to schedule backups, send reports, clean up log files, restart services, or run database maintenance tasks.

How it works

Enter your desired schedule parameters (minute, hour, day of month, month, and day of week) into the generator. You can select specific values, ranges, intervals (every X), or wildcards (any value). The tool translates these selections into the standard five-field cron syntax. Copy the resulting expression directly into your cron job (via crontab -e on Linux/Mac or task scheduler on Windows).

Examples

InputResultNotes
Every day at 2:30 AM30 2 * * *Minute 30, hour 2, any day and month; useful for nightly backups
Every Monday at 9:00 AM0 9 * * 1Monday is day 1 (0=Sunday); common for weekly reports
Every 15 minutes*/15 * * * *The */15 means every 15th minute; ideal for health checks

How to use the Cron Expression Generator

  1. Select the minute (0–59) when the task should run, or use 'Every minute' or 'Every N minutes'
  2. Choose the hour (0–23 in 24-hour format) or leave as 'Any hour' for all hours
  3. Set the day of month (1–31) if the task only runs on certain dates, otherwise select 'Any'
  4. Pick the month (1–12) if needed, or leave as 'Any month'
  5. Specify the day of week (0–6, where 0 is Sunday) or select 'Any day'
  6. Copy the generated cron expression and paste it into your crontab file or task scheduler

Benefits

  • Eliminates memorising cron syntax rules and field positions
  • Prevents scheduling errors that could interrupt production services or miss critical tasks
  • Saves time when building complex schedules (e.g., run only on weekdays at specific hours)
  • Provides instant visual feedback so you see exactly when your job will execute
  • Works for any Unix/Linux system (Linux servers, macOS, cloud platforms like AWS/Google Cloud)
  • Reduces on-call incidents caused by misconfigured automation schedules

Tips & common mistakes

Common mistakes

  • Confusing day-of-week numbering: Sunday is 0, not 1; Monday is 1, not 2
  • Using 24-hour format incorrectly (13:00 is 1 PM, not 1 AM)
  • Setting overlapping schedules that cause two jobs to run simultaneously and lock resources
  • Forgetting that cron runs in the server's timezone, not your local time

Tips

  • Always test your cron expression by checking when it will next run before deploying to production
  • Use 'Any' (wildcard) for fields you don't care about; only specify what matters (e.g., if a job runs every day, leave day-of-month and month as wildcards)
  • For critical tasks, log the output to a file (crontab: command > /var/log/mycommand.log 2>&1) so you can verify it actually ran
  • Use the step values (e.g., */5 for every 5 minutes) instead of listing individual minutes when scheduling frequently

Frequently asked questions

What's the difference between day-of-month and day-of-week in a cron expression?

Day-of-month is the date (1–31), while day-of-week is Sunday to Saturday (0–6). If you specify both, cron runs the job when either matches. To run on the 15th or any Monday, specify both; to run only on Mondays, leave day-of-month as '*'.

Can cron run tasks more frequently than once per minute?

Standard cron only goes down to 1-minute intervals. For tasks that need to run every 10 seconds, use a daemon process or systemd timer instead.

Why didn't my cron job run at the scheduled time?

Check that the cron daemon is running (systemctl status cron on Linux), the user running cron has permission to execute the command, the full file path is specified (not just the command name), and the timezone is correct on the server.

How do I disable a cron job without deleting it?

Edit the crontab (crontab -e) and comment out the line with a # at the start. Cron will skip commented lines.

Is cron the only way to schedule tasks on a server?

No. systemd timers (on modern Linux), Windows Task Scheduler, and containerized job schedulers (Kubernetes CronJob, Jenkins) are alternatives. Cron remains the most universal and lightweight option for Unix-like systems.

What happens if a cron job is still running when the next scheduled time arrives?

Cron will start a new instance of the job even if the previous one hasn't finished, which can cause resource contention. Use flock or a PID check in your script to prevent overlapping runs.

Related tools

FreeTooz Editorial Team · Last reviewed July 2026

Reviewed for accuracy. Results are estimates for general information and are not professional (medical, financial or legal) advice.