{"record":{"id":"cc038a234fa03f70","repo":"flowable/flowable-engine","slug":"increment-24","errorCode":null,"errorMessage":"Increment > 24 : ","messagePattern":"Increment > 24 : ","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java","lineNumber":713,"sourceCode":"                    ValueSet vs = getValue(val, s, i);\n                    val = vs.value;\n                    i = vs.pos;\n                }\n                i = checkNext(i, s, val, type);\n                return i;\n            }\n        } else {\n            throw new ParseException(\"Unexpected character: \" + c, i);\n        }\n\n        return i;\n    }\n\n    private void checkIncrementRange(int incr, int type, int idxPos) throws ParseException {\n        if (incr > 59 && (type == SECOND || type == MINUTE)) {\n            throw new ParseException(\"Increment > 60 : \" + incr, idxPos);\n        } else if (incr > 23 && (type == HOUR)) {\n            throw new ParseException(\"Increment > 24 : \" + incr, idxPos);\n        } else if (incr > 31 && (type == DAY_OF_MONTH)) {\n            throw new ParseException(\"Increment > 31 : \" + incr, idxPos);\n        } else if (incr > 7 && (type == DAY_OF_WEEK)) {\n            throw new ParseException(\"Increment > 7 : \" + incr, idxPos);\n        } else if (incr > 12 && (type == MONTH)) {\n            throw new ParseException(\"Increment > 12 : \" + incr, idxPos);\n        }\n    }\n\n    protected int checkNext(int pos, String s, int val, int type) throws ParseException {\n\n        int end = -1;\n        int i = pos;\n\n        if (i >= s.length()) {\n            addToSet(val, end, -1, type);\n            return i;\n        }","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java#L695-L731","documentation":"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.","triggerScenarios":"Expressions like \"0 0 0/24 * * ?\" or \"0 0 0/48 * * ?\" where the hour step exceeds 23.","commonSituations":"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.","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"],"exampleFix":"// before\nnew CronExpression(\"0 0 0/48 * * ?\");\n// after\nnew CronExpression(\"0 0 0 1/2 * ?\"); // every other day","handlingStrategy":"validation","validationCode":"if (hourStep > 23) throw new IllegalArgumentException(\"Hour step must be <= 23\");","typeGuard":null,"tryCatchPattern":"try {\n    CronExpression cron = new CronExpression(expr);\n} catch (ParseException e) {\n    if (e.getMessage().startsWith(\"Increment > 24\")) {\n        throw new ConfigurationException(\"Hour step must be <= 23: \" + expr, e);\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["cron","increment","quartz","scheduling"],"backgroundTag":"value-out-of-range","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}