Skip to content
U UtilHQ

Cron Job Generator

Cron jobs are the backbone of task automation in Unix-like operating systems. Whether you need to run backups at midnight, send weekly reports, or clean up temporary files every hour, cron expressions let you schedule these tasks with precision. However, cron syntax can be cryptic and error-prone. This free cron generator helps you build cron expressions visually, understand existing schedules, and verify when your jobs will actually run. Simply select your desired schedule from the dropdowns, and instantly see the cron expression, human-readable explanation, and the next five execution times. No more debugging why your job ran at 2 AM instead of 2 PM, or wondering if your expression syntax is correct. Perfect for developers, DevOps engineers, and system administrators who work with cron jobs regularly.

100% Free
No Data Stored
Instant Results

Cron Expression

* * * * *

Human Readable

Every minute

Next 5 Scheduled Runs

  • 1. Wed, Dec 31, 2025, 12:27 AM
  • 2. Wed, Dec 31, 2025, 12:28 AM
  • 3. Wed, Dec 31, 2025, 12:29 AM
  • 4. Wed, Dec 31, 2025, 12:30 AM
  • 5. Wed, Dec 31, 2025, 12:31 AM

Cron Format Reference

* * * * *

  • 1. Minute (0-59)
  • 2. Hour (0-23)
  • 3. Day of Month (1-31)
  • 4. Month (1-12)
  • 5. Day of Week (0-6, Sunday=0)

Special Characters: * = every, */n = every n units, , = list, - = range

Pro Tip: Always test your cron expressions in a staging environment first. Use */5 * * * * (every 5 minutes) for testing instead of * * * * *to avoid overwhelming your system with every-minute executions.

Ad Space

What is a Cron Expression?

A cron expression is a string of five (or six, in some systems) fields that define when a scheduled task should execute. Developed in the 1970s for Unix systems, cron has become the universal standard for task scheduling across Linux, macOS, and even cloud platforms like AWS and Google Cloud.

The five fields represent:

  • Minute (0-59): The minute of the hour when the job runs
  • Hour (0-23): The hour of the day in 24-hour format
  • Day of Month (1-31): Which day of the month
  • Month (1-12): Which month of the year
  • Day of Week (0-6): Which day of the week (0 = Sunday)

For example, 0 2 * * * means "run at 2:00 AM every day," while */15 * * * * means "run every 15 minutes." The asterisk (*) is a wildcard meaning "every" or "any value."

This tool eliminates the guesswork by letting you build expressions visually and immediately see when they'll execute.

Common Cron Expression Patterns

Here are the most commonly used cron patterns and what they mean:

  • * * * * * - Every minute (use cautiously!)
  • */5 * * * * - Every 5 minutes
  • 0 * * * * - Every hour at minute 0
  • 0 0 * * * - Daily at midnight
  • 0 2 * * * - Daily at 2:00 AM (common for backups)
  • 0 9 * * 1 - Every Monday at 9:00 AM
  • 0 0 1 * * - First day of every month at midnight
  • 0 0 * * 0 - Every Sunday at midnight
  • */30 9-17 * * 1-5 - Every 30 minutes during business hours (9 AM - 5 PM) on weekdays

Backups: Most production backups run at 0 2 * * * (2 AM) when server load is lowest.

Reports: Weekly reports often use 0 9 * * 1 (Monday 9 AM) to summarize the previous week.

Cleanup: Temporary file cleanup might run 0 */6 * * * (every 6 hours) to prevent disk fill-up.

How to Use Cron in Different Environments

Linux/macOS (crontab):

Edit your user's crontab with crontab -e, then add your cron expression followed by the command:

0 2 * * * /path/to/backup-script.sh

List current jobs: crontab -l

AWS CloudWatch Events / EventBridge:

AWS uses cron expressions with an additional sixth field for seconds. For example:

cron(0 2 * * ? *) - runs daily at 2 AM (the ? in day-of-week means "no specific value")

Kubernetes CronJobs:

In Kubernetes manifests, use standard 5-field cron syntax:

apiVersion: batch/v1
kind: CronJob
metadata:
  name: backup-job
spec:
  schedule: "0 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: backup
            image: backup-image:latest

GitHub Actions:

Schedule workflows using cron syntax in your YAML:

on:
  schedule:
    - cron: '0 2 * * *'

Each platform may have slight syntax variations, but the core 5-field pattern remains consistent.

Debugging Cron Jobs: Common Pitfalls

1. Time Zone Issues: Cron uses the server's local time zone, not UTC. If your server is in US Eastern (EST/EDT), 0 2 * * * runs at 2 AM Eastern, which is 7 AM UTC. Always verify your server's timezone with date or timedatectl.

2. PATH Environment: Cron jobs run with a minimal environment. Commands like npm, python, or git may not be in PATH. Always use absolute paths:

0 2 * * * /usr/bin/python3 /home/user/script.py

3. No Standard Output: Cron doesn't show output unless you redirect it. Append >> /var/log/cron.log 2>&1 to capture both stdout and stderr:

0 2 * * * /path/to/script.sh >> /var/log/backup.log 2>&1

4. Overlapping Jobs: If a job takes longer than its interval, it can overlap with the next execution. Use flock or similar locking mechanisms to prevent this.

5. Day-of-Month vs Day-of-Week: When both are specified (not *), the job runs when EITHER condition is met (OR logic, not AND). This often surprises users.

Testing Tip: Instead of waiting for your job to run, test the command manually first by copying it from your crontab and running it in your shell. This reveals PATH and permission issues immediately.

Frequently Asked Questions

What does */5 mean in a cron expression?
The */5 syntax means "every 5 units." In the minute field, */5 means "every 5 minutes" (runs at :00, :05, :10, :15, etc.). In the hour field, */5 means "every 5 hours." The asterisk represents "every value," and dividing by 5 selects every fifth occurrence. This is called a "step value" in cron terminology.
Why is my cron job not running?
Common reasons: 1) The cron daemon (crond) is not running - check with "systemctl status cron" or "ps aux | grep cron", 2) Syntax errors in your crontab - use "crontab -l" to verify your expression is saved correctly, 3) Permissions - the script must be executable (chmod +x script.sh), 4) PATH issues - cron uses a limited PATH, so use absolute paths to commands, 5) Output redirection - add ">> /tmp/cron.log 2>&1" to your command to see error messages.
What is the difference between 0 0 * * 0 and 0 0 * * 7?
Both represent Sunday, but "0" is the standard POSIX value while "7" is a non-standard extension supported by some cron implementations (like Vixie cron on Linux). For maximum compatibility, always use "0" for Sunday. Some systems accept both, while others only recognize 0-6 where 0=Sunday, 1=Monday, through 6=Saturday.
How do I run a cron job every weekday at 9 AM?
Use the expression "0 9 * * 1-5". This breaks down as: 0 (minute 0), 9 (9 AM), * (every day of month), * (every month), 1-5 (Monday through Friday). The day-of-week field uses ranges, where 1-5 represents the weekday range. This is perfect for business-hours automation like sending daily reports or running builds.
Can I run a cron job every 90 minutes?
Not with a single simple cron expression. Cron step values (*/n) only work within a single field. For 90 minutes, you would need multiple entries: "0 0,1,3,4,6,7,9,10,12,13,15,16,18,19,21,22 * * *" and "30 0,1,3,4,6,7,9,10,12,13,15,16,18,19,21,22 * * *". For complex intervals, consider using a task scheduler like systemd timers or writing a script that sleeps for 90 minutes and re-runs itself.
What timezone does cron use?
Cron uses the system's local timezone, NOT UTC. If your server is in New York (EST/EDT), "0 2 * * *" runs at 2 AM Eastern Time. To check your system timezone, run "date" or "timedatectl". To change it, use "timedatectl set-timezone America/New_York". Some cloud cron services (like AWS CloudWatch) use UTC by default - always verify the documentation for your specific platform.