Free Online Tools Logo
Free Tools
All ToolsBlogDeveloperCalculatorsDocumentsAboutFAQDisclaimerContact
Back to Blog

Developer Guide

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-068 min read

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.

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.

Try related tools

Cron Expression Generator

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

Open tool

Related posts

More articles you may like

Developer Guide

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

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

Read article
Developer Guide

How JWT Authentication Works (Step-by-Step)

Learn exactly how JWT authentication works from login to API requests with a complete 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

About

Free Online Tools offers a curated collection of 30+ browser-based utilities plus a blog with practical guides, quick tips, and tool tutorials.

Author: Zohaib Hassan
Role: Full-Stack Web Developer
Expertise: Web development, SEO, and digital tools since 2020

Tools

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

Legal

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

Creator

Built by Zohaib Hassan, a full-stack web developer from Pakistan with expertise in building fast, accessible, and privacy-friendly web applications.

About Me•Sitemap

© 2026 Free Online Tools by Zohaib Hassan. All rights reserved.

Online Free Tools — Built with care for developers worldwide