Free ToolsOnline Toolkit
All ToolsBlogDeveloperCalculatorsDocumentsAboutFAQContact
Back to Blog
Developer Guide8 min read

What Is a Cron Expression? A Complete Guide to Cron Syntax

Learn what a cron expression is, how its five fields work, and how to read or write one for scheduling automated tasks.

By Zohaib Hassan2026-07-06

Introduction

A cron expression is a short, structured string that defines a recurring schedule for automated tasks — most commonly used with the Unix/Linux cron daemon, but also adopted by countless scheduling tools, CI/CD pipelines, and job queues across nearly every platform. Instead of writing "run this every weekday at 9am" in plain English, a scheduler needs something precise and machine-readable — that's what a cron expression provides.

What Is a Cron Expression?

A cron expression is a short, structured string that defines a recurring schedule for automated tasks — most commonly used with the Unix/Linux cron daemon, but also adopted by countless scheduling tools, CI/CD pipelines, and job queues across nearly every platform. Instead of writing "run this every weekday at 9am" in plain English, a scheduler needs something precise and machine-readable — that's what a cron expression provides.

The Five Fields of a Standard Cron Expression

A standard cron expression has five space-separated fields, always in this order:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *

An asterisk (*) in any field means "every value" for that field. So * * * * * means "every minute, of every hour, of every day" — i.e., run once a minute, constantly.

Reading Real Examples

0 3 * * * — at minute 0 of hour 3, every day → runs at 3:00 AM daily.

*/15 * * * * — every 15th minute, every hour, every day → runs at :00, :15, :30, :45 of every hour.

0 9 * * 1-5 — at 9:00 AM, but only Monday through Friday (day-of-week field 1-5) → a weekday-only 9am schedule.

0 0 1 * * — at midnight, on day 1 of every month → runs once a month, on the 1st.

Special Characters You'll Encounter

Asterisk (*) — matches every possible value for that field.

Comma (,) — specifies a list, e.g. 1,15 in the day field means "the 1st and 15th of the month."

Hyphen (-) — specifies a range, e.g. 1-5 in the day-of-week field means Monday through Friday.

Slash (/) — specifies a step value, e.g. */15 in the minute field means "every 15 minutes."

Common Shorthand Expressions

Many cron implementations also support shorthand strings in place of the five fields: @yearly (or @annually) runs once a year, @monthly once a month, @weekly once a week, @daily (or @midnight) once a day, and @hourly once an hour. These are convenient but not universally supported across every scheduler, so check your specific tool's documentation.

Where Cron Expressions Show Up

Beyond the traditional Unix cron daemon, this same expression format (or a close variant) is used by: CI/CD pipeline schedules (GitHub Actions, GitLab CI), cloud scheduler services (AWS EventBridge, Google Cloud Scheduler), application-level job schedulers in nearly every programming language, and container orchestration tools like Kubernetes CronJobs.

Writing Your Own

Manually working out the right combination of fields for a specific schedule — especially anything beyond the simplest daily/hourly patterns — is easy to get subtly wrong. Use our free Cron Expression Generator to build a schedule using plain English, a visual builder, or by pasting an existing expression to see exactly what it means and when it'll next run.

For ready-made patterns, browse our list of 10 common cron expression examples, or understand the differences between the two major dialects in cron vs Quartz cron.

Conclusion

A cron expression's five fields — minute, hour, day-of-month, month, day-of-week — combine with a small set of special characters (*, ,, -, /) to express nearly any recurring schedule precisely. Once you can read the fields in order, decoding (or writing) any cron expression becomes straightforward.

Frequently Asked Questions

What is a cron expression?

A cron expression is a string of five space-separated fields that defines a recurring schedule for automated tasks. It is used by the Unix cron daemon, CI/CD pipelines, cloud schedulers, and job queues to determine when a task should run.

How many fields are in a standard cron expression?

A standard cron expression has five fields representing minute, hour, day-of-month, month, and day-of-week. Each field can contain a specific value, an asterisk for "every," a comma-separated list, a range with a hyphen, or a step value with a slash.

What does an asterisk mean in a cron expression?

An asterisk (*) in a cron field means "every possible value" for that field. For example, an asterisk in the hour field means "every hour," and an asterisk in the day-of-week field means "every day of the week."

What does */15 mean in a cron expression?

The notation */15 means "every 15 units" of the field it is in. In the minute field, */15 runs at :00, :15, :30, and :45 of every hour. In the hour field, it runs every 15 hours starting at midnight.

What is the difference between 0 9 * * 1-5 and 0 9 * * 1,5?

The expression 0 9 * * 1-5 runs at 9:00 AM every weekday from Monday through Friday (a range). The expression 0 9 * * 1,5 runs at 9:00 AM only on Monday and Friday (a list of two specific days).

Can cron expressions run every second?

No, a standard Unix cron expression cannot schedule tasks at second-level precision. The smallest unit of time in standard cron is the minute. For second-level scheduling, you need Quartz cron or a dedicated job scheduler like Celery or Sidekiq.

What are cron shorthand expressions?

Shorthand expressions are abbreviations that replace the five fields: @yearly runs once a year, @monthly once a month, @weekly once a week, @daily once a day, and @hourly once an hour. Not all cron implementations support these shorthands.

Where are cron expressions used besides Linux crontab?

Cron expressions are used in GitHub Actions and GitLab CI workflow schedules, AWS EventBridge and Google Cloud Scheduler, application-level job schedulers in most programming languages, Kubernetes CronJobs, and many other automation platforms.

How do I test if my cron expression is correct?

Use a cron expression generator or validator tool to preview the next several run times for your expression. This lets you confirm the schedule behaves as expected before deploying it to production. Our free Cron Expression Generator shows upcoming run times for any expression.

What happens if a cron job misses a scheduled time?

If the system is down or the cron service is stopped when a job is scheduled, the missed run typically will not execute when the system comes back online. Standard cron does not have built-in catch-up logic, though some implementations and schedulers can be configured to handle missed executions.


Frequently asked questions

What is a cron expression?

A cron expression is a string of five space-separated fields that defines a recurring schedule for automated tasks. It is used by the Unix cron daemon, CI/CD pipelines, cloud schedulers, and job queues to determine when a task should run.

How many fields are in a standard cron expression?

A standard cron expression has five fields representing minute, hour, day-of-month, month, and day-of-week. Each field can contain a specific value, an asterisk for "every," a comma-separated list, a range with a hyphen, or a step value with a slash.

What does an asterisk mean in a cron expression?

An asterisk (*) in a cron field means "every possible value" for that field. For example, an asterisk in the hour field means "every hour," and an asterisk in the day-of-week field means "every day of the week."

What does */15 mean in a cron expression?

The notation */15 means "every 15 units" of the field it is in. In the minute field, */15 runs at :00, :15, :30, and :45 of every hour. In the hour field, it runs every 15 hours starting at midnight.

What is the difference between 0 9 * * 1-5 and 0 9 * * 1,5?

The expression 0 9 * * 1-5 runs at 9:00 AM every weekday from Monday through Friday (a range). The expression 0 9 * * 1,5 runs at 9:00 AM only on Monday and Friday (a list of two specific days).

Can cron expressions run every second?

No, a standard Unix cron expression cannot schedule tasks at second-level precision. The smallest unit of time in standard cron is the minute. For second-level scheduling, you need Quartz cron or a dedicated job scheduler like Celery or Sidekiq.

What are cron shorthand expressions?

Shorthand expressions are abbreviations that replace the five fields: @yearly runs once a year, @monthly once a month, @weekly once a week, @daily once a day, and @hourly once an hour. Not all cron implementations support these shorthands.

Where are cron expressions used besides Linux crontab?

Cron expressions are used in GitHub Actions and GitLab CI workflow schedules, AWS EventBridge and Google Cloud Scheduler, application-level job schedulers in most programming languages, Kubernetes CronJobs, and many other automation platforms.

How do I test if my cron expression is correct?

Use a cron expression generator or validator tool to preview the next several run times for your expression. This lets you confirm the schedule behaves as expected before deploying it to production. Our free Cron Expression Generator shows upcoming run times for any expression.

What happens if a cron job misses a scheduled time?

If the system is down or the cron service is stopped when a job is scheduled, the missed run typically will not execute when the system comes back online. Standard cron does not have built-in catch-up logic, though some implementations and schedulers can be configured to handle missed executions.

About the Author

Written by Zohaib Hassan , a Software Engineer specializing in modern web development, developer tools, and user-focused software solutions. He builds fast, privacy-first browser utilities that simplify everyday tasks for developers, students, businesses, and professionals worldwide. GitHub LinkedIn Published: July 6, 2026

About the author

Zohaib Hassan

Zohaib Hassan writes practical developer and productivity guides for Free Online Tools. Each article is built to help you learn faster and apply new concepts immediately with tools, examples, and clear explanations.

Published: 2026-07-06

Try related tools

Cron Expression Generator

Open the tool and apply this article's ideas immediately.

Open tool

Related posts

Developer Guide

What is a JWT Token? A Complete Beginner's Guide

Wondering what is a JWT token? Learn about JSON Web Tokens - their structure, how they work, and when to use them for web authentication.

Read article
Developer Guide

How JWT Authentication Works (Step-by-Step)

Learn how JWT authentication works from login to API requests with a step-by-step guide covering tokens, refresh flows, and security best practices.

Read article
Developer Guide

What is Base64 Encoding? How It Works and When to Use It

Learn what Base64 encoding is, how the algorithm works, and when to use it for email attachments, APIs, and data URLs in web development.

Read article

Free Tools

Online toolkit

A premium collection of browser-first utilities for developers, creators, and teams who want fast, private workflows without signup.

Built by Zohaib Hassan — trusted web tools designed for speed, precision, and privacy.

Explore

  • All Tools
  • Blog
  • Developer Tools
  • Document Tools
  • Calculators

Resources

  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • FAQ
  • Contact

Company

  • About
  • Sitemap
  • Request a tool

© 2026 Free Online Tools. All rights reserved.

Crafted for developers, students, and teams who value private browser-first utilities.