argoproj/argo-workflows · warning
cron schedules must consist of 5 values only
Error message
cron schedules must consist of 5 values only
What it means
ScheduleValidator checks user-entered cron schedules and throws the same error as PrettySchedule when the input has 6 or more space-separated values. The component only validates 5-field crons and shows a success icon via cronstrue otherwise; 6+ fields are rejected up front.
Source
Thrown at ui/src/cron-workflows/schedule-validator.tsx:9
import x from 'cronstrue';
import * as React from 'react';
import {SuccessIcon, WarningIcon} from '../shared/components/fa-icons';
export function ScheduleValidator({schedule}: {schedule: string}) {
try {
if (schedule.split(' ').length >= 6) {
throw new Error('cron schedules must consist of 5 values only');
}
return (
<span>
<SuccessIcon /> {x.toString(schedule)}
</span>
);
} catch (e) {
return (
<span>
<WarningIcon /> Schedule maybe invalid: {e.toString()}
</span>
);
}
}
View on GitHub (pinned to 35bff19146)
Solutions
- Enter a standard 5-field cron expression (minute hour day-of-month month day-of-week).
- Remove the seconds/year fields from a Quartz expression.
- Catch the error in the validator and show a helpful message telling the user only 5-field crons are supported.
Example fix
// before schedule: '0 30 9 * * ?' // after schedule: '30 9 * * *'
Defensive patterns
Strategy: validation
Validate before calling
const isValidCron = (s: string) => s.trim().split(/\s+/).length === 5;
if (!isValidCron(schedule)) showWarning('Use a 5-field cron expression'); Type guard
const isFiveFieldCron = (s: string): boolean => s.trim().split(/\s+/).length === 5;
Try / catch
try {
<ScheduleValidator schedule={schedule} />
} catch {
<WarningIcon /> Only 5-field cron expressions are supported;
} Prevention
- Validate schedules on input in the cron-workflow form.
- Strip seconds/year fields when importing Quartz crons.
- Show inline validation before submission.
When it happens
Trigger: Typing a schedule in the cron-workflow form with 6+ fields, e.g. Quartz '0 30 9 * * ?' or '30 9 * * * 2026'.
Common situations: Copying Quartz/6-field crons from Java schedulers or crontab variants that include seconds or year fields; pasting with trailing whitespace.
Related errors
- cron schedules must consist of 5 values only
- Should specify a node when we get archived logs
- no artifact logs are available
- invalid ConcurrencyPolicy: %s
- error stopping workflow %s: %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/19f43ecd44aece9e.
Report an issue: GitHub.