{"record":{"id":"870026ac765326cc","repo":"jeecgboot/JeecgBoot","slug":"increment-7-incr","errorCode":null,"errorMessage":"Increment >= 7 : {incr}","messagePattern":"Increment >= 7 : (.+?)","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":734,"sourceCode":"                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)\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","sourceCodeStart":716,"sourceCodeEnd":752,"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#L716-L752","documentation":"checkIncrementRange rejects a step value greater than 7 for DAY_OF_WEEK (weekdays range 1-7). A step like '/8' is invalid. Message echoes the increment.","triggerScenarios":"Day-of-week step out of range: '0 0 0 ? * 1/8', or a computed weekly interval > 7 placed in the dow field.","commonSituations":"Confusing dow step with a multi-week interval (Quartz has no native 'every N weeks' via dow step beyond 7); dynamic step generation without bounds; off-by-one around 7.","solutions":["Cap day-of-week steps at 7; common values are '/2' (every other day within the week).","For 'every N weeks' there is no single cron field - schedule a job and skip runs in your code, or compute fire times explicitly.","Clamp computed dow steps to 1-7."],"exampleFix":"// before - day-of-week step > 7\nString cron = \"0 0 0 ? * 1/8\";  // Increment >= 7 : 8\n\n// after - valid dow step (every other day)\nString cron = \"0 0 0 ? * 1/2\";","handlingStrategy":"validation","validationCode":"// DAY_OF_WEEK step must be <= 7.\npublic static String validateDowStep(String dowField) {\n    return validateStepRange(dowField, 7);\n}\n// (validateStepRange as defined in error 295)","typeGuard":"public static boolean dowStepValid(String dowField) {\n    return stepWithinMax(dowField, 7);\n}","tryCatchPattern":"try {\n    new CronExpression(expr);\n} catch (ParseException e) {\n    if (e.getMessage().startsWith(\"Increment >= 7\")) {\n        return \"Day-of-week steps must be <= 7; Quartz has no native multi-week step. \" + e.getMessage();\n    }\n    throw e;\n}","preventionTips":["Clamp day-of-week steps to 7.","For 'every N weeks', filter runs in application code rather than using a dow step.","Validate dow-step bounds in the cron builder."],"tags":["cron","xxl-job","step-operator","day-of-week","validation","parse-error"],"backgroundTag":null,"analyzedSha":"96fb33f5ec68516da0b0147da06b2eb0419e063a","analyzedAt":"2026-08-14T00:04:16.786Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}