Skip to content

Common Cron Expressions

A cron expression uses five space-separated fields to define a schedule: minute (0–59), hour (0–23), day of month (1–31), month (1–12 or JAN–DEC), and day of week (0–7 or SUN–SAT, where 0 and 7 represent Sunday). Special characters like * (all values), / (step), , (list), - (range), and L (last) give you fine-grained control over execution timing. Browse the common patterns below or use the Cron Helper to build custom expressions interactively.

Every X Minutes

* * * * *

Runs every minute

High-frequency monitoring, health checks, or log tailing

Build this in Cron Helper
*/5 * * * *

Runs every 5 minutes

Application health pings, cache warming intervals

Build this in Cron Helper
*/10 * * * *

Runs every 10 minutes

Metric collection, queue polling, status updates

Build this in Cron Helper
*/15 * * * *

Runs every 15 minutes

Database cleanup tasks, summary report generation

Build this in Cron Helper
*/30 * * * *

Runs every 30 minutes

Scheduled syncs, moderate-frequency batch jobs

Build this in Cron Helper

Hourly

0 * * * *

At minute 0 of every hour

Hourly data aggregation, on-the-hour reporting

Build this in Cron Helper
0 */2 * * *

Every 2 hours

Bi-hourly cache refreshes, staggered backups

Build this in Cron Helper
0 */6 * * *

Every 6 hours

Six-hourly log rotation, index maintenance

Build this in Cron Helper
0 */12 * * *

Twice daily

Twice-daily data exports, certificate renewal checks

Build this in Cron Helper

Daily

0 0 * * *

Every day at 12:00 AM

Midnight database backups, daily report generation

Build this in Cron Helper
0 1 * * *

Every day at 1:00 AM

Off-peak maintenance, log archival, sync operations

Build this in Cron Helper
0 6 * * *

Every day at 6:00 AM

Pre-business-hour data processing, morning cache warm-up

Build this in Cron Helper
0 12 * * *

Every day at 12:00 PM

Midday status checks, lunch-hour batch jobs

Build this in Cron Helper
0 23 * * *

Every day at 11:00 PM

End-of-day summaries, nightly ETL pipelines

Build this in Cron Helper
0 6,18 * * *

At 6:00 AM and 6:00 PM

Morning and evening syncs, twice-daily notifications

Build this in Cron Helper

Weekly

0 0 * * 1

At midnight on Monday

Weekly report kickoff, Monday morning maintenance

Build this in Cron Helper
0 9 * * 1

At 9:00 AM on Monday

Start-of-week team notifications, weekly digest email

Build this in Cron Helper
0 8 * * 1-5

Monday to Friday at 8:00 AM

Pre-work data load, weekday morning alerts

Build this in Cron Helper
0 0 * * 1-5

Monday to Friday at midnight

Weeknight batch processing, end-of-business-day tasks

Build this in Cron Helper
0 0 * * 0,6

Saturday and Sunday at midnight

Weekend-only maintenance, full system scans

Build this in Cron Helper
0 17 * * 5

Friday at 5:00 PM

Weekend deployment prep, end-of-week summary

Build this in Cron Helper

Monthly

0 0 1 * *

At midnight on the 1st

Monthly billing runs, invoice generation

Build this in Cron Helper
0 3 1 * *

At 3:00 AM on the 1st

Off-peak monthly aggregation, report finalization

Build this in Cron Helper
0 0 1,15 * *

At midnight on 1st and 15th

Bi-monthly payroll sync, milestone checkpoints

Build this in Cron Helper
0 0 L * *

At midnight on the last day

Month-end reconciliation, usage cap resets

Build this in Cron Helper
0 0 1 */3 *

First day of every quarter

Quarterly financial reporting, license compliance audit

Build this in Cron Helper

Yearly

0 0 1 1 *

At midnight on Jan 1

Annual certificate renewal, new-year data archival

Build this in Cron Helper
0 0 1 6 *

At midnight on June 1

Mid-year review triggers, semi-annual cleanup

Build this in Cron Helper
0 0 1 */6 *

First day every 6 months

Semi-annual system audits, dependency upgrade reminders

Build this in Cron Helper

Special Intervals

0 0 * * 0

At midnight on Sunday

Weekly full-system backup, end-of-week cleanup

Build this in Cron Helper
*/10 * * * 1-5

Every 10 minutes, weekdays only

Business-hours monitoring, weekday trading data feed

Build this in Cron Helper
0 9-17 * * 1-5

Every hour 9 AM to 5 PM weekdays

Business hours only — hourly report generation, uptime checks

Build this in Cron Helper
*/30 9-17 * * 1-5

Every 30 min during business hours

Intra-day performance checks, SLA compliance polling

Build this in Cron Helper

Need a custom schedule? Try the interactive cron expression builder.

Open Cron Helper

Common Cron Expressions — Comprehensive Cron Schedule Reference

Cron expressions are the backbone of task scheduling on Unix-like systems. This reference covers 40+ common cron expressions, from every-minute monitoring to yearly audits, with human-readable explanations and real-world use cases.

Whether you are configuring a Linux crontab, setting up Kubernetes CronJobs, orchestrating CI/CD pipelines, or scheduling cloud infrastructure tasks, this guide helps you find the right expression fast.


Understanding Cron Syntax

A standard cron expression consists of five space-separated fields:

* * * * *
| | | | |
| | | | +---- Day of week (0-7, 0=Sun, 7=Sun)
| | | +------ Month (1-12, or JAN-DEC)
| | +-------- Day of month (1-31)
| +---------- Hour (0-23)
+------------ Minute (0-59)

Each field accepts:

  • * — Wildcard, matches all valid values
  • N — Specific value (e.g., 5 in minute field = minute 5)
  • */N — Step, every N units (e.g., */15 = every 15 minutes)
  • N,M,O — List, multiple specific values (e.g., 0,30 = minute 0 and 30)
  • N-M — Range (e.g., 9-17 = hours 9 through 17)
  • L — Last (day of month or day of week only, e.g., L in day-of-month = last day)
  • W — Nearest weekday (day of month only, e.g., 15W = nearest weekday to the 15th)
  • # — Nth occurrence (day of week only, e.g., 1#2 = second Monday)

Special Characters Explained

The Asterisk (*) — Wildcard

The most common character. * means "every possible value" for that field.

0 * * * * — At minute 0 of every hour (hourly)

* * * * * — Every single minute

The Slash (/) — Step

Defines increments. */N means "every N units".

*/5 * * * * — Every 5 minutes

0 */2 * * * — Every 2 hours

The Comma (,) — List

Specifies multiple discrete values.

0 6,18 * * * — At 6 AM and 6 PM daily

0 0 1,15 * * — Midnight on the 1st and 15th of every month

The Hyphen (-) — Range

Defines a contiguous range of values.

0 9-17 * * 1-5 — Every hour from 9 AM to 5 PM, Monday to Friday

0 0 * * 1-5 — Midnight Monday through Friday

The L Character — Last

Represents the "last" valid value.

0 0 L * * — Midnight on the last day of the month

0 0 * * 5L — Midnight on the last Friday of the month


Common Mistakes When Writing Cron Expressions

Mistake 1: Confusing Day of Month and Day of Week

When both day-of-month and day-of-week are specified (not *), the job runs when either matches. This is a common source of unexpected behavior.

0 0 1 * 1 — Runs on the 1st of the month AND on every Monday, not the first Monday.

Mistake 2: Using 7 for Sunday

Most cron implementations accept both 0 and 7 for Sunday, but not all. Always prefer 0 for Sunday for maximum compatibility.

Mistake 3: Forgetting That Cron Uses the System Timezone

Cron runs in the system's timezone, which is usually UTC on servers. Always verify your expected timezone, especially for production deployments.

Mistake 4: Off-by-One in Minute Field

A common error: 0 0 * * * runs at midnight (00). 0 1 * * * runs at 1 AM. The range is 0-23 for hours.

Mistake 5: Assuming Cron Jobs Run If the System Was Down

Cron does not catch up on missed jobs. If the system is off during a scheduled time, that execution is skipped permanently.


Cron in Different Systems

Linux Cron (crontab)

Standard cron provided by most Linux distributions. Edit with crontab -e, list with crontab -l.

# Run backup daily at 2 AM
0 2 * * * /usr/local/bin/backup.sh
 
# Rotate logs every Sunday at 3 AM
0 3 * * 0 /usr/local/bin/logrotate.sh
 
# Health check every 5 minutes
*/5 * * * * /usr/local/bin/healthcheck.sh

Kubernetes CronJobs

Kubernetes uses standard cron expressions with the addition of a timezone field in newer versions.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: cleanup
spec:
  schedule: "0 1 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: cleanup
            image: busybox
            command: ["/bin/sh", "-c", "cleanup.sh"]
          restartPolicy: OnFailure

CI/CD Pipeline Cron (GitHub Actions)

name: Nightly Build
on:
  schedule:
    - cron: '0 3 * * *'
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm run build

AWS CloudWatch Events / EventBridge

{
  "ScheduleExpression": "cron(0 6 * * ? *)",
  "Name": "morning-cleanup",
  "State": "ENABLED"
}

Spring Boot (Java)

@Component
public class ScheduledTasks {
 
    @Scheduled(cron = "0 0 4 * * ?")
    public void performCleanup() {
        // Runs daily at 4 AM
    }
 
    @Scheduled(cron = "0 */30 9-17 * * 1-5")
    public void checkSlaCompliance() {
        // Every 30 minutes during business hours
    }
}

Cron Expression Cheat Sheet by Frequency

Frequency Expression Description
Every minute * * * * * Runs 1,440 times daily
Every 5 minutes */5 * * * * Standard monitoring interval
Every 15 minutes */15 * * * * Typical metric collection
Every 30 minutes */30 * * * * Queue polling interval
Hourly 0 * * * * On the hour
Daily at midnight 0 0 * * * End-of-day processing
Daily at 6 AM 0 6 * * * Pre-business data prep
Weekly (Monday) 0 0 * * 1 Start-of-week tasks
Monthly (1st) 0 0 1 * * Billing, reporting
Yearly (Jan 1) 0 0 1 1 * Annual maintenance
Business hours 0 9-17 * * 1-5 Weekdays only
Every 10 min weekdays */10 * * * 1-5 Business-hours monitoring

Cron Expression FAQ

What does */5 in cron mean?

*/5 in any field means "every 5 units". For the minute field, it means the job runs at minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55.

Can cron expressions run on specific timezones?

Standard cron uses the system timezone. Some implementations (Kubernetes 1.27+, Quartz Scheduler) support timezone specification. For Linux crontab, set CRON_TZ=America/New_York at the top of your crontab file.

What is the difference between cron and anacron?

cron assumes the system is always running. anacron is designed for systems that may be off during scheduled times — it catches up on missed jobs at the next boot. anacron is ideal for laptops and desktops.

Can I use cron with seconds?

Standard Unix cron does not support seconds. For second-level precision, use systemd timers, Quartz Scheduler, or a custom sleep loop within a cron job.

What does ? mean in cron expressions?

The ? character is used in Quartz-style cron expressions (AWS CloudWatch, Spring, Terracotta). It means "no specific value" and is used where you specify either day-of-month or day-of-week but not both.

How do I test a cron expression before deploying?

Use the LangStop Cron Helper to build and validate expressions interactively. It shows the next execution times and helps catch syntax errors before you deploy to production.

Why is my cron job not running?

Common causes: incorrect syntax (run through a validator), wrong timezone assumption, environment variables not set, missing execute permissions on the script, or the cron daemon not running (systemctl status cron).

Does cron handle daylight saving time?

Yes, but carefully. Jobs scheduled during a DST transition hour may run twice (fall back) or not at all (spring forward). For critical jobs, use UTC to avoid DST complications.

What is the non-standard syntax (6-field cron)?

Some systems (Quartz, CloudWatch) use 6 fields: seconds, minutes, hours, day-of-month, month, day-of-week, with ? replacing * for fields you want left unspecified.


Related Resources

  • Cron Helper — Build and test cron expressions interactively
  • Cron Expression Validator — Validate cron syntax
  • Unix Time Converter — Convert timestamps across timezones

Browse the 40+ cron expressions above and copy the ones you need. For custom schedules, use the interactive Cron Helper to build and test your expression.