Free Online Tools Logo
Free Tools
All ToolsBlogDeveloperCalculatorsDocumentsAboutFAQDisclaimerContact
Back to Blog

Developer Guide

Cron vs Quartz Cron: What’s the Difference?

Standard Unix cron and Quartz cron (used in Java scheduling) look similar but differ in format. Here’s exactly what changes and why it matters.

By Zohaib Hassan2026-07-066 min read

Two Cron Formats, One Confusing Overlap

If you've worked with Java-based scheduling — particularly the Quartz Scheduler library, widely used in Spring applications — you've likely noticed that its cron expressions look almost, but not quite, like standard Unix cron. Copy a working Unix cron expression into a Quartz configuration (or vice versa) and it can fail validation or, worse, silently behave differently than expected. Here's exactly what's different.

Field Count: 5 vs 6-7

Standard Unix cron uses five fields: minute, hour, day-of-month, month, day-of-week.

Quartz cron uses six required fields, with an optional seventh: seconds, minute, hour, day-of-month, month, day-of-week, and optionally year.

Unix:   *    *    *    *    *
        min  hour dom  mon  dow

Quartz: *    *    *    *    *    ?    *
        sec  min  hour dom  mon  dow  year

The added seconds field means Quartz can schedule things with second-level precision, which standard cron cannot do at all — the minute is the smallest unit standard cron understands.

The Day-of-Month / Day-of-Week Conflict Rule

Quartz has a rule that standard cron doesn't: you cannot specify both day-of-month and day-of-week as specific values in the same expression — one of the two must be a question mark (?), meaning "no specific value." For example, in Quartz, 0 0 12 15 * ? (noon on the 15th of every month, no specific day-of-week) is valid, but trying to also specify a day-of-week alongside a specific day-of-month is not permitted and will cause a validation error.

Day-of-Week Numbering Differences

Standard Unix cron typically numbers Sunday as 0 (with some implementations also accepting 7 as Sunday). Quartz numbers days 1-7 with Sunday as 1, not 0 — this is a common silent bug source when porting a schedule from one system to the other without adjusting the numbering.

Side-by-Side Example

Goal: run every weekday at 9:00:00 AM.

Standard Unix cron: 0 9 * * 1-5

Quartz cron: 0 0 9 ? * MON-FRI

Notice Quartz's extra seconds field (the leading 0), the question mark in the day-of-month position (since day-of-week is being used instead), and that Quartz commonly accepts named weekday abbreviations (MON-FRI) directly, which vanilla Unix cron implementations don't always support.

Which One Do You Need?

If you're scheduling anything through a standard Linux crontab, CI/CD pipeline (GitHub Actions, GitLab CI), or most cloud schedulers (AWS EventBridge, Google Cloud Scheduler) — use standard Unix cron format.

If you're configuring a job in Quartz Scheduler directly, or in a Java/Spring application using Quartz under the hood (common in Spring Boot's @Scheduled(cron = ...) annotation, which uses Quartz-style expressions), use Quartz format.

Generating Either Format

Rather than manually tracking these differences every time, use our Cron Expression Generator — switch between Standard and Quartz mode with one toggle, and the tool generates correctly formatted, valid expressions for whichever format you need.

Conclusion

Standard cron and Quartz cron solve the same problem — defining a recurring schedule — but differ in field count, precision (seconds), the day-of-month/day-of-week exclusivity rule, and day-of-week numbering. Knowing which system you're targeting before writing (or copying) an expression avoids a frustrating class of silent scheduling bugs.

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