Cron Generator

Generate cron schedule expressions

* * * * *

Every minute

What is Cron Generator?

Cron is the time-based job scheduler built into Unix-like operating systems that executes commands or scripts at specified intervals. A cron expression is a compact string of five space-separated fields — minute, hour, day of month, month, and day of week — that defines exactly when a job should run. Cron jobs power critical infrastructure tasks including database backups, log rotation, certificate renewal, email dispatch, data synchronization, and report generation. Mastering cron syntax is essential for any developer or system administrator who needs to automate recurring tasks on a Linux server.

How to Use

  1. Set each field individually using the input boxes, or click a preset to load a common schedule instantly
  2. An asterisk (*) in any field means 'every possible value' — the job runs at every minute, hour, or day for that field
  3. Use step syntax (*/n) for intervals — */5 in the minute field means 'every 5 minutes'
  4. Use commas to list specific values — 1,15 in the day-of-month field means 'on the 1st and 15th'
  5. Click Copy to place the generated expression on your clipboard, ready to paste into your crontab

Why Use This Tool?

Instant human-readable description eliminates misinterpretation of complex cron expressions
Common presets cover the schedules most developers need — daily, hourly, weekly, weekday 9 AM
Field-by-field editing with labeled value ranges prevents out-of-bounds mistakes
Copy-ready output works directly with crontab -e, GitHub Actions schedules, and Kubernetes CronJobs
Experimenting with different patterns builds intuition for cron syntax without risking production schedules

Tips & Best Practices

  • 0 0 * * * runs at midnight every day — ideal for daily database backups and log rotation
  • */5 * * * * runs every 5 minutes — useful for health checks and monitoring scripts
  • 0 9 * * 1-5 runs at 9 AM Monday through Friday — perfect for weekday reporting tasks
  • Always test new cron expressions in a non-production environment before deploying to critical servers
  • Consider timezone differences when scheduling time-sensitive jobs — cron uses the system's local time by default
  • Add descriptive comments above each crontab entry so your future self knows what the job does

Frequently Asked Questions

What does each field in a cron expression represent?

The five fields, in order, are: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 and 7 both mean Sunday). Some systems support a sixth field for seconds at the beginning. Each field constrains when the job runs — an asterisk means 'every value' for that time unit.

How do I run a job every N minutes or hours?

Use the step syntax */n. For example, */5 * * * * runs every 5 minutes, */30 * * * * runs every 30 minutes, and 0 */2 * * * runs every 2 hours at the top of the hour. This is cleaner and less error-prone than listing all values manually with commas.

Can I schedule a job on specific days of the week?

Yes. Use the day-of-week field (the fifth field). 0 9 * * 1,3,5 runs at 9 AM on Monday, Wednesday, and Friday. 0 9 * * 1-5 runs at 9 AM every weekday. You can also combine day-of-month and day-of-week — if both are specified (not *), the job runs when either condition matches.

When should I NOT use cron?

Avoid cron for jobs that require sub-minute precision, for tasks that must run only after a previous job completes successfully, or for distributed systems where multiple servers might trigger the same job simultaneously. Use a job queue (Sidekiq, Celery) or an orchestrator (Airflow, Temporal) for those scenarios.

Is my data private when using this tool?

Yes. This tool runs entirely in your browser with no server communication. The cron expressions you build are never transmitted, logged, or stored anywhere. The tool works offline once the page has loaded.

What are cron special strings and shortcuts?

Some cron implementations support shorthand: @yearly (0 0 1 1 *), @monthly (0 0 1 * *), @weekly (0 0 * * 0), @daily or @midnight (0 0 * * *), @hourly (0 * * * *), and @reboot (runs once at system startup). These are convenient but not supported by all cron daemons — check your system's documentation.

Real-world Examples

Scheduling a daily database backup at 2 AM

A PostgreSQL backup script should run every night during low-traffic hours to minimize impact on production queries.

Input
Minute: 0 | Hour: 2 | Day: * | Month: * | Weekday: *
Output
0 2 * * *
Runs at 2:00 AM every day

Running a health check every 5 minutes on weekdays

A monitoring script pings critical services every 5 minutes during business hours on weekdays only.

Input
Minute: */5 | Hour: 9-17 | Day: * | Month: * | Weekday: 1-5
Output
*/5 9-17 * * 1-5
Runs every 5 minutes from 9 AM to 5 PM, Monday through Friday

Related Tools