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

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-06

Introduction

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.

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.

Frequently Asked Questions

What is the main difference between cron and Quartz cron?

The main differences are that Quartz cron has six or seven fields (including seconds and optionally year) compared to standard cron's five fields, and Quartz requires a question mark (?) in either the day-of-month or day-of-week field. Standard cron does not support second-level precision.

Why does Quartz cron have a seconds field?

The seconds field allows Quartz to schedule tasks with second-level precision, which standard Unix cron cannot do. This is useful in Java applications where precise timing is needed, such as high-frequency data processing or real-time event handling.

What does the question mark mean in Quartz cron?

The question mark (?) in Quartz cron means "no specific value." It is required in either the day-of-month or day-of-week field, because Quartz does not allow both to be specified simultaneously. One must be a ? while the other can contain a specific value or wildcard.

How does day-of-week numbering differ between cron and Quartz?

Standard Unix cron typically uses 0 for Sunday (with some implementations also accepting 7), while Quartz uses 1 for Sunday and 7 for Saturday. This difference is a common source of bugs when porting cron expressions between systems.

Can I use Quartz cron expressions in a standard Linux crontab?

No, standard Linux crontab does not support Quartz cron expressions. It only accepts the five-field standard format. Using a Quartz expression in a crontab entry will cause a syntax error or unexpected behavior.

Which Spring Boot scheduling format should I use?

Spring Boot's @Scheduled annotation uses Quartz-style cron expressions by default, which means six fields with the seconds field first. You should write Quartz-format expressions when configuring scheduled tasks in Spring Boot applications.

Does GitHub Actions use cron or Quartz format?

GitHub Actions uses standard five-field Unix cron format for its schedule triggers. If you are setting up a workflow schedule in GitHub Actions, write your expression in standard cron format without the seconds field.

How do I convert a cron expression to Quartz format?

To convert, add a seconds field (usually 0) at the beginning, add a ? in the day-of-month field if you are using day-of-week, and adjust day-of-week numbering from 0-based (Sunday=0) to 1-based (Sunday=1). Use our Cron Expression Generator to toggle between formats instantly.

What is the ? field in the year position of Quartz cron?

The year field in Quartz cron is optional and rarely used. When present, it accepts values from 1970 to 2099 or a ?. The ? is commonly placed in the year field for most everyday scheduling tasks since you typically do not need year-specific scheduling.

Are there other cron variants besides standard and Quartz?

Yes, several tools have their own cron dialects. AWS EventBridge, Google Cloud Scheduler, and cron libraries in Python (APScheduler), Ruby, and Node.js each have slight variations in supported syntax and field ranges. Always check the documentation for the specific scheduler you are using.


Frequently asked questions

What is the main difference between cron and Quartz cron?

The main differences are that Quartz cron has six or seven fields (including seconds and optionally year) compared to standard cron's five fields, and Quartz requires a question mark (?) in either the day-of-month or day-of-week field. Standard cron does not support second-level precision.

Why does Quartz cron have a seconds field?

The seconds field allows Quartz to schedule tasks with second-level precision, which standard Unix cron cannot do. This is useful in Java applications where precise timing is needed, such as high-frequency data processing or real-time event handling.

What does the question mark mean in Quartz cron?

The question mark (?) in Quartz cron means "no specific value." It is required in either the day-of-month or day-of-week field, because Quartz does not allow both to be specified simultaneously. One must be a ? while the other can contain a specific value or wildcard.

How does day-of-week numbering differ between cron and Quartz?

Standard Unix cron typically uses 0 for Sunday (with some implementations also accepting 7), while Quartz uses 1 for Sunday and 7 for Saturday. This difference is a common source of bugs when porting cron expressions between systems.

Can I use Quartz cron expressions in a standard Linux crontab?

No, standard Linux crontab does not support Quartz cron expressions. It only accepts the five-field standard format. Using a Quartz expression in a crontab entry will cause a syntax error or unexpected behavior.

Which Spring Boot scheduling format should I use?

Spring Boot's @Scheduled annotation uses Quartz-style cron expressions by default, which means six fields with the seconds field first. You should write Quartz-format expressions when configuring scheduled tasks in Spring Boot applications.

Does GitHub Actions use cron or Quartz format?

GitHub Actions uses standard five-field Unix cron format for its schedule triggers. If you are setting up a workflow schedule in GitHub Actions, write your expression in standard cron format without the seconds field.

How do I convert a cron expression to Quartz format?

To convert, add a seconds field (usually 0) at the beginning, add a ? in the day-of-month field if you are using day-of-week, and adjust day-of-week numbering from 0-based (Sunday=0) to 1-based (Sunday=1). Use our Cron Expression Generator to toggle between formats instantly.

What is the ? field in the year position of Quartz cron?

The year field in Quartz cron is optional and rarely used. When present, it accepts values from 1970 to 2099 or a ?. The ? is commonly placed in the year field for most everyday scheduling tasks since you typically do not need year-specific scheduling.

Are there other cron variants besides standard and Quartz?

Yes, several tools have their own cron dialects. AWS EventBridge, Google Cloud Scheduler, and cron libraries in Python (APScheduler), Ruby, and Node.js each have slight variations in supported syntax and field ranges. Always check the documentation for the specific scheduler you are using.

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.