flowable/flowable-engine · error · ParseException

Increment > 7 :

Error message

Increment > 7 : 

What it means

Parse-time guard in CronExpression.checkIncrementRange: the step/increment part of the day-of-week field exceeds 7, which is outside the 1-7 range of weekday values, so the cron string is rejected at the offending position.

Solutions

  1. Reduce the day-of-week step to 7 or less
  2. Use '1/7' or '?' correctly in the other field (a weekly step of 7 means every listed weekday; use day stepping for longer intervals)
  3. Validate step inputs against 1-7 before building the expression

Example fix

// before
new CronExpression("0 0 0 ? * 1/8");
// after
new CronExpression("0 0 0 ? * MON");
Defensive patterns

Strategy: validation

Validate before calling

if (dowStep > 7) throw new IllegalArgumentException("Day-of-week step must be <= 7");

Try / catch

try {
    CronExpression cron = new CronExpression(expr);
} catch (ParseException e) {
    if (e.getMessage().startsWith("Increment > 7")) {
        throw new ConfigurationException("Day-of-week step must be <= 7: " + expr, e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Expressions like "0 0 0 ? * 1/8" where the day-of-week step exceeds 7.

Common situations: Generated cron strings from UI interval pickers; confusion between day-of-month and day-of-week stepping.

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

Appendix: source

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

                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);

        if (c == 'L') {

View on GitHub (pinned to d6d39ce1c6)