jeecgboot/JeecgBoot · error · ParseException
Increment >= 60 : {incr}
Error message
Increment >= 60 : {incr} What it means
checkIncrementRange rejects a step value greater than 59 for SECOND or MINUTE fields, since those fields max out at 59. A step like '/60' or '/120' is meaningless and throws. The message echoes the offending increment. The function is called from the '/' handling after the increment is parsed.
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:728
c = s.charAt(i);
if (c >= '0' && c <= '9') {
ValueSet vs = getValue(val, s, i);
val = vs.value;
i = vs.pos;
}
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()) {View on GitHub (pinned to 96fb33f5ec)
Solutions
- Cap second/minute steps at 59; use '/30', '/15', '/10' for common intervals.
- If you meant minutes, move the step to the minute field (second field '0 0/2 * * * ?' = every 2 minutes).
- When generating steps, clamp to the field's maximum (59 for sec/min, 23 for hour, 31 dom, 7 dow, 12 month).
Example fix
// before - seconds step > 59 String cron = "0/120 * * * * ?"; // Increment >= 60 : 120 // after - every 2 minutes (step in minute field) String cron = "0 0/2 * * * ?";
Defensive patterns
Strategy: validation
Validate before calling
// Field maxima for step validation: SECOND/MINUTE=59.
public static String validateStepRange(String field, int fieldMax) {
if (field == null || !field.contains("/")) return null;
try {
String stepPart = field.substring(field.indexOf('/') + 1).replaceAll("[^0-9]", "");
int step = Integer.parseInt(stepPart);
if (step > fieldMax) return "step " + step + " exceeds field max " + fieldMax;
} catch (NumberFormatException ignored) { /* let parser report */ }
return null;
}
// usage for seconds/minutes: validateStepRange(secondsField, 59); validateStepRange(minutesField, 59); Type guard
public static boolean stepWithinMax(String field, int max) {
if (field == null || !field.contains("/")) return true;
try {
String s = field.substring(field.indexOf('/') + 1).replaceAll("[^0-9]", "");
return Integer.parseInt(s) <= max;
} catch (NumberFormatException e) { return false; }
} Try / catch
try {
new CronExpression(expr);
} catch (ParseException e) {
if (e.getMessage().startsWith("Increment >= 60")) {
return "Second/minute steps must be <= 59; move larger intervals to the right field. " + e.getMessage();
}
throw e;
} Prevention
- Clamp second/minute steps to 59 in any interval generator.
- Distinguish seconds from minutes fields when building 'every N' expressions.
- Offer preset intervals (every 15s/30s, every 1/5/10 min) in the UI.
When it happens
Trigger: Seconds or minutes step out of range: '0/60 * * * * ?' (SECOND), '0 0/70 * * * ?' (MINUTE), or an expression builder that computes a step > 59 for these fields.
Common situations: Confusing minutes with seconds (e.g. '/120' to mean 'every 2 minutes' but placed in the seconds field); dynamic step generation without per-field bounds; typo adding a digit.
Related errors
- '/' must be followed by an integer.
- Unexpected end of string.
- Increment >= 24 : {incr}
- Increment >= 31 : {incr}
- Increment >= 7 : {incr}
AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14).
Data as JSON: /api/errors/e6ab79eb644aa918.
Report an issue: GitHub.