Skip to content
cronhelp.me
Guide · Foot-guns

Redundant term in a field

Short answer
A repeated value, or a star mixed into a list, does not change when the job runs — but it usually signals the author was confused about the field.
WrongMonday listed twice
0 0 * * 1,1
Righteach value once
0 0 * * 1

Some fields contain terms that add nothing. Listing the same value twice, including a value already covered by a range, or mixing * into a comma list all produce exactly the same schedule as the simplified form — cron deduplicates internally — so the output is harmless. The reason this is worth flagging is that redundancy usually means the author was thinking about the field incorrectly, and the next edit may introduce a real bug.

0 0 * * 1,1 lists Monday twice; it runs every Monday, the same as 0 0 * * 1. 0 0 * * 1-5,3 adds Wednesday to a range that already includes it. And 0 0 * * *,5 mixes a star — which already means "every day" — with a specific day, so the ,5 is pure noise: the star wins and the job runs daily.

That last pattern is the most telling. When someone writes *,5, they often meant to narrow the field to Friday and misremembered how the star works, or they were editing a list and left the star behind. The schedule runs every day, not on Fridays, which is a substantive difference hiding behind a "harmless" redundancy. Catching it early is cheaper than discovering it in production.

The fix is simply to write each value once and drop any star that shares a field with a real value: 0 0 * * 1, 0 0 * * 1-5, 0 0 * * 5. This is an informational finding — nothing is broken — but a clean field is easier to read, easier to diff, and less likely to be misread by the next person who edits it. Tidy cron entries are their own small form of documentation.

Watch the linter flag it live — the finding below appears the moment the expression is entered:

Cron expression5-field
At 12:00 AM, only on Monday and Monday
Lint
Inforedundant-term
'1' (Monday) in '1,1' changes nothing — '1' (Monday) already covers it. Remove it so the schedule reads the way it actually runs.
Learn more →
Next runs
#
1
2
3
4
5
6
7
Copy as
All lint rulesSeverity: Info