Cron expression with 6 fields: seconds first or year last?

Standard cron has 5 fields. A 6-field cron expression adds seconds at the front (Spring, Quartz, Azure Functions) or a year at the end (AWS).

5 min readSume
All posts

A 6-field cron expression is standard five-field cron (minute, hour, day of month, month, day of week) plus one extra field, and the scheduler decides which: Spring, Quartz and Azure Functions add seconds at the front, while AWS EventBridge Scheduler adds a year at the end. Linux crontab and Kubernetes CronJobs take five fields, so a string copied from one system to another can fire at the wrong time or not parse at all.

Scheduler facts come from each vendor's own docs, listed under Sources. Sume facts come from the Scheduled and Create a schedule docs and from current code. All were read on 2026-09-28.

Which schedulers use 5 fields and which use 6?

The table writes one schedule, 9:00 a.m. Monday through Friday, in each dialect. Note the day-of-week column: the numbers change between systems.

From crontab(5), Kubernetes, Spring, Quartz, Azure Functions, EventBridge Scheduler and Sume's Scheduled docs, read 2026-09-28.
SchedulerFieldsOrder9:00 a.m., Mon–Fri
Linux crontab (cronie)5minute, hour, day of month, month, day of week0 9 * * 1-5
Kubernetes CronJob5minute, hour, day of month, month, day of week0 9 * * 1-5
Spring @Scheduled6second, minute, hour, day of month, month, day of week0 0 9 * * MON-FRI
Quartz6, or 7 with the optional yearseconds, minutes, hours, day of month, month, day of week, year0 0 9 ? * 2-6
Azure Functions timer (NCRONTAB)6 (the 5-field format also works)second, minute, hour, day, month, day of week0 0 9 * * 1-5
AWS EventBridge Scheduler6minutes, hours, day of month, month, day of week, yearcron(0 9 ? * 2-6 *)
Sume Scheduled5, plus an IANA time zoneminute, hour, day of month, month, day of week0 9 * * 1-5

Why is 1-5 Monday to Friday in one scheduler and not another?

Day-of-week numbers are not portable. crontab and Spring allow 0 to 7, with 0 and 7 both Sunday; Kubernetes counts 0 to 6, Sunday to Saturday, and Azure numbers days 0 to 6 starting with Sunday. Quartz and AWS count 1 to 7 from Sunday: Quartz reads 2#1 as the first Monday of the month, and AWS reads 3#2 as the second Tuesday. So 1-5 is Monday to Friday in the first four and Sunday to Thursday in the last two, where weekdays are 2-6.

Three-letter names avoid the mix-up where a scheduler takes them: crontab accepts ranges of names such as mon-fri, Spring and Quartz use MON-FRI in their own examples, and AWS lists SUN-SAT as day-of-week values. Quartz and AWS also restrict the two day fields: Quartz says you must currently use ? in one of them, and AWS won't take * in both, asking for ? in the other. That is why their rows put ? in day of month.

Can a cron expression run every few seconds?

Only in a dialect whose first field is seconds. Spring's */10 * * * * * runs every ten seconds, and Azure's 5-7 * * * * * fires at seconds 5 through 7 of every minute. crontab examines its entries every minute, so a minute is its finest step. The sixth field on AWS is a year, not seconds: EventBridge Scheduler invokes targets with 60-second precision. Sume's Scheduled has no seconds field either.

How do I convert a 6-field expression to 5 fields?

  • Seconds first (Spring, Quartz, Azure): drop the first field. That only works when it holds one value such as 0; five fields cannot fire twice within a minute.
  • Year last (AWS): drop cron(, the closing ) and the year. A single fixed year has no five-field form.
  • Replace ? with * and renumber day of week: Quartz and AWS 2-6 is crontab 1-5.
  • Check both day fields. When both are restricted, crontab runs the command when either one matches: 30 4 1,15 * 5 runs at 4:30 a.m. on the 1st, the 15th and every Friday.
  • Never paste six fields into a crontab line. There the sixth field is the command to run, so every value shifts one place and the last time field becomes part of the command.

What cron format does Sume's Scheduled accept?

Five fields in an IANA time zone. A Sume schedule is a saved Agents automation that runs on a cadence: hourly, daily and weekly presets write the expression for you, and custom takes a raw expression. In current code, the create form's weekdays option writes M H * * 1-5, Monday to Friday. A six-field schedule comes over by the rules above, so Spring's 0 0 9 * * MON-FRI becomes 0 9 * * 1-5.

Current code also refuses what other schedulers accept: a sixth field fails with cron_expr must be 5 fields (minute hour day-of-month month day-of-week); seconds are not supported., macros such as @daily are refused, and so is an unknown time zone. Scheduled AI video agent runs covers where schedules are authored, their triggers and their receipts.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume