What is Comma Separator (,)?

A special character for specifying a list of discrete values in a cron field.

Definition

The comma (,) allows you to specify multiple discrete values within a single cron field. For example, "0 9,12,17 * * *" runs at 9 AM, 12 PM, and 5 PM. Unlike ranges (which include all values between start and end), commas let you cherry-pick specific values that may not be contiguous.

💡

Simple Analogy

Like telling someone "meet me at 9, noon, and 5" — you are listing specific times, not a continuous range.

Why It Matters

Commas enable non-contiguous schedules without creating multiple cron jobs. Instead of three separate jobs for 9 AM, noon, and 5 PM, you write one expression. This keeps your job list clean and makes management easier.

How to Verify

Count the comma-separated values in each field — that is how many times the job runs per cycle. "1,3,5" in the day-of-week field means 3 days per week (Monday, Wednesday, Friday).

⚠️

Common Mistakes

Adding spaces after commas (cron fields are space-delimited, so "9, 12" would be parsed incorrectly). Using commas when a range would be clearer (1,2,3,4,5 should be written as 1-5). Exceeding field limits with typos like "0,60" in the minute field.

Best Practices

Use commas for non-contiguous values (1,15 for 1st and 15th of month). Use ranges for contiguous sequences (9-17 instead of 9,10,11,12,13,14,15,16,17). Keep lists short and readable — if you have more than 5 values, consider if a step expression might work instead.

Cron Expression Generator

Build your cron expression

Try it free →

Frequently Asked Questions

What is Comma Separator (,)?

The comma (,) allows you to specify multiple discrete values within a single cron field. For example, "0 9,12,17 * * *" runs at 9 AM, 12 PM, and 5 PM. Unlike ranges (which include all values between start and end), commas let you cherry-pick specific values that may not be contiguous.

Why does Comma Separator (,) matter for cron jobs?

Commas enable non-contiguous schedules without creating multiple cron jobs. Instead of three separate jobs for 9 AM, noon, and 5 PM, you write one expression. This keeps your job list clean and makes management easier.

What are best practices for Comma Separator (,)?

Use commas for non-contiguous values (1,15 for 1st and 15th of month). Use ranges for contiguous sequences (9-17 instead of 9,10,11,12,13,14,15,16,17). Keep lists short and readable — if you have more than 5 values, consider if a step expression might work instead.

Related Terms

What is Comma Separator (,)? | CronJobPro