Cron Expression Generator
Build, validate, and translate cron expressions visually.
Client-side only. Nothing leaves your browser
Every 5 minutes
What is a Cron Expression?
A cron expression is a string of five fields that defines a schedule for running automated tasks on Unix-like systems. Each field specifies a time unit (minute, hour, day of month, month, and day of week), and together they tell the cron daemon exactly when to execute a command. Cron is the standard task scheduler on Linux and macOS servers, and cron expressions are also used by many cloud platforms, CI/CD tools, and container orchestration systems like Kubernetes.
Cron Expression Format
A standard cron expression has five space-separated fields:
* * * * *minute hour dom month dow| Field | Values | Special Characters |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of Month | 1-31 | * , - / |
| Month | 1-12 | * , - / |
| Day of Week | 0-7 (0 and 7 = Sun) | * , - / |
Common Cron Expression Examples
| Expression | Description |
|---|---|
| * * * * * | Every minute |
| */5 * * * * | Every 5 minutes |
| 0 * * * * | Every hour (at minute 0) |
| 0 0 * * * | Every day at midnight |
| 0 3 * * * | Every day at 3:00 AM |
| 0 9-17 * * 1-5 | Every hour from 9 AM to 5 PM on weekdays |
| 0 0 * * 0 | Every Sunday at midnight |
| 0 0 1 * * | First day of every month at midnight |
| 0 0 1 1 * | Once a year on January 1st |
| */15 * * * * | Every 15 minutes |
| 0 */6 * * * | Every 6 hours |
| 30 4 1,15 * * | At 4:30 AM on the 1st and 15th of every month |
Cron Special Characters
| Character | Meaning | Example |
|---|---|---|
| * | Any value (wildcard) | * in minute = every minute |
| , | List of values | 1,15 in day = 1st and 15th |
| - | Range of values | 1-5 in DOW = Mon through Fri |
| / | Step / interval | */5 in minute = every 5 minutes |
Frequently Asked Questions
What does */5 mean in a cron expression?
The /5 syntax means "every 5th unit." When used in the minute field (/5 * * * *), it runs the job every 5 minutes (at 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55 minutes past the hour). The slash (/) is the step operator: */N means "every Nth value starting from 0." You can use it in any field: */2 in the hour field means every 2 hours, */3 in the month field means every 3 months.
What is the difference between cron and crontab?
Cron is the daemon (background service) that runs scheduled tasks on Unix/Linux systems. Crontab (cron table) is the file that contains the schedule entries. Each line is a cron expression followed by a command. You edit your crontab with 'crontab -e', list it with 'crontab -l', and remove it with 'crontab -r'. Each user has their own crontab, and there's also a system-wide crontab at /etc/crontab.
Is a cron expression 5 or 6 fields?
The standard Unix/Linux cron uses 5 fields: minute, hour, day of month, month, and day of week. However, some systems use 6 or 7 fields. Quartz Scheduler (common in Java) adds a seconds field at the beginning and an optional year field at the end. AWS EventBridge uses 6 fields with a year field. Spring Boot's @Scheduled uses 6 fields with seconds. This tool uses the standard 5-field format used by crontab on Linux and macOS.
Are cron expressions in UTC?
By default, cron uses the system's local timezone, not UTC. On most servers, this is set in /etc/timezone or via the TZ environment variable. You can override the timezone for cron jobs by adding TZ=UTC at the top of your crontab, or per-job: TZ=America/New_York 0 9 * * * /path/to/script.sh. Cloud services like AWS and Azure typically run cron expressions in UTC unless configured otherwise.
What happens if a cron job takes longer than the interval?
Cron does not wait for the previous execution to finish. It starts a new instance on schedule regardless. This can lead to overlapping runs if your job takes longer than the interval. To prevent this, use a lock file (flock command): */5 * * * * flock -n /tmp/myjob.lock /path/to/script.sh. The -n flag makes flock exit immediately if the lock is held, so only one instance runs at a time.
Related Tools
Cron to systemd Timer
Convert cron expressions to systemd .service and .timer files with OnCalendar syntax.
Unit File Generator
Generate systemd .service, .timer, and .socket unit files visually. Set ExecStart, User, Restart, env vars, and Install target.
Unit File Validator
Validate systemd unit files. Paste a .service, .timer, .socket, or .mount file and catch missing directives, bad syntax, and errors.
htpasswd Generator
Generate htpasswd entries for Apache, Nginx, and Traefik basic auth. bcrypt, apr1, MD5, and SHA-1.
PM2 Ecosystem Generator
Visual builder for ecosystem.config.js. Configure cluster mode, env vars, watch, and max_memory_restart.
Need to manage SSH connections?
SSH Workbench lets you connect, browse files, and manage servers visually.
Try SSH Workbench Free