xuxueli/xxl-job · error · ParseException
Increment >= 7 : {}
Error message
Increment >= 7 : {} What it means
Thrown by checkIncrementRange when a step/increment value in the Day-of-Week field exceeds 7. The day-of-week field cycles through 1-7 (SUN=1 through SAT=7), so an increment of 8 or more is rejected.
Source
Thrown at xxl-job-admin/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java:734
i = checkNext(i, s, val, type);
return i;
}
} else {
throw new ParseException("Unexpected character: " + c, i);
}
return i;
}
private void checkIncrementRange(int incr, int type, int idxPos) throws ParseException {
if (incr > 59 && (type == SECOND || type == MINUTE)) {
throw new ParseException("Increment >= 60 : " + incr, idxPos);
} else if (incr > 23 && (type == HOUR)) {
throw new ParseException("Increment >= 24 : " + incr, idxPos);
} else if (incr > 31 && (type == DAY_OF_MONTH)) {
throw new ParseException("Increment >= 31 : " + incr, idxPos);
} else if (incr > 7 && (type == DAY_OF_WEEK)) {
throw new ParseException("Increment >= 7 : " + incr, idxPos);
} else if (incr > 12 && (type == MONTH)) {
throw new ParseException("Increment >= 12 : " + incr, idxPos);
}
}
protected int checkNext(int pos, String s, int val, int type)
throws ParseException {
int end = -1;
int i = pos;
if (i >= s.length()) {
addToSet(val, end, -1, type);
return i;
}
char c = s.charAt(pos);
View on GitHub (pinned to e74c784f68)
Solutions
- Reduce the day-of-week increment to 7 or less.
- Remember that Quartz day-of-week is 1-7, not 0-6.
- Validate step values against 7 for the day-of-week field before constructing the expression.
Example fix
// before "0 0 0 ? * 1/10" // after "0 0 0 ? * 1/2"
Defensive patterns
Strategy: validation
Validate before calling
// Validate step increment for day-of-week (field index 5)
String[] parts = cron.trim().split("\\s+");
if (parts.length > 5 && parts[5].contains("/")) {
int step = Integer.parseInt(parts[5].substring(parts[5].indexOf("/") + 1));
if (step > 7) throw new IllegalArgumentException("Day-of-week step must be <= 7: " + step);
} Type guard
boolean isValidDayOfWeekStep(String dowField) {
if (!dowField.contains("/")) return true;
int step = Integer.parseInt(dowField.substring(dowField.indexOf("/") + 1));
return step >= 1 && step <= 7; Try / catch
try {
new CronExpression(cron);
} catch (ParseException e) {
if (e.getMessage().contains("Increment >= 7")) {
// reduce the weekday step
}
} Prevention
- Remember Quartz day-of-week is 1-7 (not 0-6), so steps max at 7.
- Clamp day-of-week step values to 1-7 before building the expression.
- Validate increment values against the field maximum.
When it happens
Trigger: A cron expression like '0 0 0 ? * 1/8' where the increment after '/' in the day-of-week field is >= 8. The check at line 733 tests incr > 7 with type DAY_OF_WEEK.
Common situations: Generating a weekday increment without bounds checking, or treating the day-of-week field as 0-indexed (0-6) and accidentally producing a value of 8.
Related errors
- Increment >= 60 : {}
- Increment >= 24 : {}
- Increment >= 31 : {}
- Increment >= 12 : {}
- Unexpected character '{}' after '/'
AI-assisted analysis of xuxueli/xxl-job@e74c784f68 (2026-08-14).
Data as JSON: /api/errors/e6a6b6b791ae6dde.
Report an issue: GitHub.