jeecgboot/JeecgBoot · error · ParseException
Increment >= 12 : {incr}
Error message
Increment >= 12 : {incr} What it means
checkIncrementRange rejects a step value greater than 12 for the MONTH field, since months range 1-12. A '/13' or larger step is invalid. Message echoes the increment.
Source
Thrown at jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java:736
}
} 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);
if (c == 'L') {
if (type == DAY_OF_WEEK) {View on GitHub (pinned to 96fb33f5ec)
Solutions
- Cap month steps at 12; common values are '/2', '/3', '/4', '/6'.
- For 'every N years' there is no month-field step beyond 12 - use the optional year field or filter runs in code.
- Clamp computed month steps to 1-12.
Example fix
// before - month step > 12 String cron = "0 0 0 1 1/13 ?"; // Increment >= 12 : 13 // after - quarterly String cron = "0 0 0 1 1/3 ?";
Defensive patterns
Strategy: validation
Validate before calling
// MONTH step must be <= 12.
public static String validateMonthStep(String monthField) {
return validateStepRange(monthField, 12);
}
// (validateStepRange as defined in error 295) Type guard
public static boolean monthStepValid(String monthField) {
return stepWithinMax(monthField, 12);
} Try / catch
try {
new CronExpression(expr);
} catch (ParseException e) {
if (e.getMessage().startsWith("Increment >= 12")) {
return "Month steps must be <= 12; for multi-year intervals use the year field or filter in code. " + e.getMessage();
}
throw e;
} Prevention
- Clamp month steps to 12; use '/2', '/3', '/4', '/6' for common cadences.
- For 'every N years', add the optional 7th year field or filter runs in code.
- Validate month-step bounds in generated expressions.
When it happens
Trigger: Month step out of range: '0 0 0 1 1/13 ?', or a computed yearly interval > 12 placed in the month field.
Common situations: Confusing month step with a multi-year interval; dynamic interval generation without per-field bounds; typo adding a digit (e.g. '/13' instead of '/3').
Related errors
- Invalid Month value: '{sub}'
- '/' must be followed by an integer.
- Unexpected end of string.
- Increment >= 60 : {incr}
- Increment >= 24 : {incr}
AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14).
Data as JSON: /api/errors/0f35f633fa4cf3c8.
Report an issue: GitHub.