{"record":{"id":"4675e6c27fb347dd","repo":"alibaba/spring-cloud-alibaba","slug":"increment-7","errorCode":null,"errorMessage":"Increment > 7 : {}","messagePattern":"Increment > 7 : (.+?)","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/util/CronExpression.java","lineNumber":445,"sourceCode":"\t\t\t\t}\n\n\t\t\t\tincr = getNumericValue(s, i);\n\n\t\t\t\ti++;\n\t\t\t\tif (incr > 10) {\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (incr > 59 && (type == SECOND || type == MINUTE)) {\n\t\t\t\t\tthrow new ParseException(\"Increment > 60 : \" + incr, i);\n\t\t\t\t}\n\t\t\t\telse if (incr > 23 && (type == HOUR)) {\n\t\t\t\t\tthrow new ParseException(\"Increment > 24 : \" + incr, i);\n\t\t\t\t}\n\t\t\t\telse if (incr > 31 && (type == DAY_OF_MONTH)) {\n\t\t\t\t\tthrow new ParseException(\"Increment > 31 : \" + incr, i);\n\t\t\t\t}\n\t\t\t\telse if (incr > 7 && (type == DAY_OF_WEEK)) {\n\t\t\t\t\tthrow new ParseException(\"Increment > 7 : \" + incr, i);\n\t\t\t\t}\n\t\t\t\telse if (incr > 12 && (type == MONTH)) {\n\t\t\t\t\tthrow new ParseException(\"Increment > 12 : \" + incr, i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tincr = 1;\n\t\t\t}\n\n\t\t\taddToSet(ALL_SPEC_INT, -1, incr, type);\n\t\t\treturn i;\n\t\t}\n\t\telse if (c == 'L') {\n\t\t\ti++;\n\t\t\tif (type == DAY_OF_MONTH) {\n\t\t\t\tlastdayOfMonth = true;\n\t\t\t}\n\t\t\tif (type == DAY_OF_WEEK) {","sourceCodeStart":427,"sourceCodeEnd":463,"githubUrl":"https://github.com/alibaba/spring-cloud-alibaba/blob/115d5901102009492e05d5ec18c3f79cad4077d0/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/util/CronExpression.java#L427-L463","documentation":"Thrown when a step value after '/' exceeds 7 in the DAY_OF_WEEK field (guard at CronExpression.java:444-445). Day-of-week values run 1 (SUN) through 7 (SAT), so a step larger than 7 is rejected.","triggerScenarios":"`new CronExpression(\"0 0 0 ? * */8\")` (day-of-week step 8) or any step > 7 in the day-of-week position.","commonSituations":"Confusion between 0-based and 1-based weekday numbering, or a step meant for another field landing in day-of-week due to a field-count mistake.","solutions":["Use a day-of-week step <= 7, e.g. '*/8' -> '*/2'.","Remember weekdays are 1-7 here (SUN=1...SAT=7).","If you need 'every other week', cron steps cannot express it; use a fixed schedule or an external trigger."],"exampleFix":"// before\nnew CronExpression(\"0 0 0 ? * */8\");\n// after\nnew CronExpression(\"0 0 0 ? * */2\"); // every 2 days-of-week","handlingStrategy":"validation","validationCode":"static boolean stepWithin(String field, int max) {\n    int slash = field.indexOf('/');\n    if (slash < 0) return true;\n    try { return Integer.parseInt(field.substring(slash + 1)) <= max; }\n    catch (NumberFormatException e) { return false; }\n}","typeGuard":null,"tryCatchPattern":"try {\n    CronExpression cron = new CronExpression(raw);\n} catch (ParseException e) {\n    throw new IllegalArgumentException(\"Invalid cron expression: \" + raw, e);\n}","preventionTips":["Day-of-week is 1-7 (SUN=1 ... SAT=7); steps cap at 7.","Cron steps cannot model 'every N weeks'; use a fixed calendar or external trigger.","Validate weekday numbering against this parser's dayMap."],"tags":["cron","schedulerx","spring-cloud-alibaba","configuration","parsing","validation","range-check"],"backgroundTag":null,"analyzedSha":"115d5901102009492e05d5ec18c3f79cad4077d0","analyzedAt":"2026-08-14T04:47:13.900Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}