Crontab Generator — Cron Expression Builder

What is a cron job?

A cron job is a scheduled task that runs automatically on a Unix-like system at a defined time or interval. The name comes from cron, a time-based job scheduler built into Linux and macOS. Cron jobs are used to automate repetitive tasks: sending emails, running database backups, clearing caches, polling APIs, generating reports, and any other work that should happen on a regular schedule without human intervention.

Each cron job is defined by a cron expression — a compact string of five fields that tells the scheduler exactly when to run the job. The expression builder above converts those fields into a human-readable description so you can verify the schedule before deploying it.

What is crontab?

Crontab (cron table) is the configuration file where cron jobs are defined on a Unix system. Each line in a crontab file is one scheduled job: a cron expression followed by the command to run. You edit it with crontab -e and list existing jobs with crontab -l. Modern platforms like Cloudflare Workers, AWS EventBridge, GitHub Actions, and Kubernetes CronJobs all use the same five-field cron expression format.

Cron expression syntax

A cron expression has five space-separated fields: minute hour day-of-month month day-of-week. Each field controls one time unit, and combining them defines exactly when the job runs.

Field ranges

Special characters

Common cron expressions

Platform differences

The standard five-field UNIX format is used by Linux crontab, Cloudflare Workers Cron Triggers, and GitHub Actions schedules. AWS EventBridge adds a sixth year field and uses ? as a wildcard for day-of-month or day-of-week (both cannot be specified at once). Kubernetes CronJobs use the standard five-field format. Some platforms add a seconds field at the start, making it a six-field expression — check your platform's documentation.

Frequently asked questions

What is a cron job used for?

Cron jobs automate any task that needs to run on a schedule: database backups, sending digest emails, clearing expired sessions, rotating log files, polling external APIs for updates, generating reports, syncing data between services, running health checks, and triggering deployments. If a task needs to happen at the same time repeatedly, a cron job is the standard solution.

How do I run a cron job every hour?

Use 0 * * * * — minute 0, every hour. The 0 in the minute field means it runs at the top of each hour (00:00, 01:00, 02:00, etc.). To run every 30 minutes use */30 * * * *; every 15 minutes use */15 * * * *.

What does */5 mean in a cron expression?

The / character is a step operator. */5 in the minute field means "every 5 minutes" — starting at 0, then 5, 10, 15, 20, and so on. 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.

How do I set up a cron job on Linux?

Run crontab -e to open your crontab file in the default editor. Add one line per job in the format expression command — for example: 0 2 * * * /home/user/backup.sh runs the script at 2 AM daily. Save and exit; cron picks up the changes immediately. Use crontab -l to list all your current jobs and crontab -r to remove them all.

What is the difference between cron and crontab?

cron is the daemon (background service) that runs scheduled jobs. crontab is the configuration file (and command) that defines which jobs cron should run. You interact with crontab to manage schedules; cron runs silently in the background executing them.