flowable/flowable-engine · error · ParseException
Increment > 24 :
Error message
Increment > 24 :
What it means
checkIncrementRange rejects an increment larger than 23 for the HOUR field. The step value in an hour field '/n' expression must be within the field's valid range (0-23); exceeding it throws this ParseException.
Solutions
- Cap the hour step at 23
- Express longer periods using the day-of-month field or a separate schedule/trigger mechanism
- Split the schedule into multiple cron expressions if needed
Example fix
// before
new CronExpression("0 0 0/48 * * ?");
// after
new CronExpression("0 0 0 1/2 * ?"); // every other day Defensive patterns
Strategy: validation
Validate before calling
if (hourStep > 23) throw new IllegalArgumentException("Hour step must be <= 23"); Try / catch
try {
CronExpression cron = new CronExpression(expr);
} catch (ParseException e) {
if (e.getMessage().startsWith("Increment > 24")) {
throw new ConfigurationException("Hour step must be <= 23: " + expr, e);
}
throw e;
} Prevention
- Clamp hour steps to 23
- For periods longer than 24 hours use day-field stepping or a different trigger mechanism
- Validate configuration-driven step sizes at startup
When it happens
Trigger: Expressions like "0 0 0/24 * * ?" or "0 0 0/48 * * ?" where the hour step exceeds 23.
Common situations: Developers trying to express 'every N hours' with N larger than 24 (e.g. every 2 days at midnight), or computing step sizes from duration configurations.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/cc038a234fa03f70.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java:713
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()) {
addToSet(val, end, -1, type);
return i;
}View on GitHub (pinned to d6d39ce1c6)