flowable/flowable-engine · error · ParseException

Increment > 60 :

Error message

Increment > 60 : 

What it means

checkIncrementRange rejects an increment (the '/n' step value) larger than 59 for SECOND or MINUTE fields. The step value in a cron 'start/incr' expression must fit within the field's range; this is reported as 'Increment > 60' at the field's index position.

Solutions

  1. Reduce the step to 59 or less (e.g. 0/30)
  2. Use the field's max allowed step (*/59 for second/minute) and restructure the schedule otherwise
  3. Compute an equivalent schedule with multiple trigger definitions or a different trigger type (e.g. TimeDuration or programmatic timer)

Example fix

// before
new CronExpression("0 0/61 * * * ?");
// after
new CronExpression("0 0/59 * * * ?");
Defensive patterns

Strategy: validation

Validate before calling

boolean isValidStep(String expr, int max) {
    int i = expr.indexOf('/');
    if (i < 0) return true;
    try { return Integer.parseInt(expr.substring(i + 1).split("\\D")[0]) <= max; }
    catch (NumberFormatException e) { return false; }
}
// for SECOND/MINUTE fields: isValidStep(field, 59)

Try / catch

try {
    CronExpression cron = new CronExpression(expr);
} catch (ParseException e) {
    if (e.getMessage().startsWith("Increment >")) {
        throw new ConfigurationException("Cron step value exceeds field range: " + expr, e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Expressions like "0 0/61 * * * ?" or "0/70 * * * * ?" where the second/minute step exceeds 59.

Common situations: Hand-written cron steps computed from durations (e.g. stepping every 90 seconds) that cannot be expressed as a single cron step; auto-generated expressions using unbounded numeric inputs.

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/7a2d2ca0439b6c51. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java:711

                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()) {
            addToSet(val, end, -1, type);

View on GitHub (pinned to d6d39ce1c6)