{"record":{"id":"0f35f633fa4cf3c8","repo":"jeecgboot/JeecgBoot","slug":"increment-12-incr","errorCode":null,"errorMessage":"Increment >= 12 : {incr}","messagePattern":"Increment >= 12 : (.+?)","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java","lineNumber":736,"sourceCode":"            }\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)\n            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        }\n\n        char c = s.charAt(pos);\n\n        if (c == 'L') {\n            if (type == DAY_OF_WEEK) {","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/jeecgboot/JeecgBoot/blob/96fb33f5ec68516da0b0147da06b2eb0419e063a/jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java#L718-L754","documentation":"checkIncrementRange rejects a step value greater than 12 for the MONTH field, since months range 1-12. A '/13' or larger step is invalid. Message echoes the increment.","triggerScenarios":"Month step out of range: '0 0 0 1 1/13 ?', or a computed yearly interval > 12 placed in the month field.","commonSituations":"Confusing month step with a multi-year interval; dynamic interval generation without per-field bounds; typo adding a digit (e.g. '/13' instead of '/3').","solutions":["Cap month steps at 12; common values are '/2', '/3', '/4', '/6'.","For 'every N years' there is no month-field step beyond 12 - use the optional year field or filter runs in code.","Clamp computed month steps to 1-12."],"exampleFix":"// before - month step > 12\nString cron = \"0 0 0 1 1/13 ?\";  // Increment >= 12 : 13\n\n// after - quarterly\nString cron = \"0 0 0 1 1/3 ?\";","handlingStrategy":"validation","validationCode":"// MONTH step must be <= 12.\npublic static String validateMonthStep(String monthField) {\n    return validateStepRange(monthField, 12);\n}\n// (validateStepRange as defined in error 295)","typeGuard":"public static boolean monthStepValid(String monthField) {\n    return stepWithinMax(monthField, 12);\n}","tryCatchPattern":"try {\n    new CronExpression(expr);\n} catch (ParseException e) {\n    if (e.getMessage().startsWith(\"Increment >= 12\")) {\n        return \"Month steps must be <= 12; for multi-year intervals use the year field or filter in code. \" + e.getMessage();\n    }\n    throw e;\n}","preventionTips":["Clamp month steps to 12; use '/2', '/3', '/4', '/6' for common cadences.","For 'every N years', add the optional 7th year field or filter runs in code.","Validate month-step bounds in generated expressions."],"tags":["cron","xxl-job","step-operator","month-field","validation","parse-error"],"backgroundTag":null,"analyzedSha":"96fb33f5ec68516da0b0147da06b2eb0419e063a","analyzedAt":"2026-08-14T00:04:16.786Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}