{"record":{"id":"3fb53dba5648ce61","repo":"xuxueli/xxl-job","slug":"increment-60","errorCode":null,"errorMessage":"Increment >= 60 : {}","messagePattern":"Increment >= 60 : (.+?)","errorType":"validation","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"xxl-job-admin/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java","lineNumber":728,"sourceCode":"                c = s.charAt(i);\n                if (c >= '0' && c <= '9') {\n                    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)\n            throws ParseException {\n\n        int end = -1;\n        int i = pos;\n\n        if (i >= s.length()) {","sourceCodeStart":710,"sourceCodeEnd":746,"githubUrl":"https://github.com/xuxueli/xxl-job/blob/e74c784f68f81fa89cb350913ef15794865d7b12/xxl-job-admin/src/main/java/com/xxl/job/admin/business/scheduler/cron/CronExpression.java#L710-L746","documentation":"Thrown by checkIncrementRange when a step/increment value in the seconds or minutes field exceeds 59. The maximum meaningful step for a field that cycles through 0-59 is 59; values of 60 or above are rejected as illogical.","triggerScenarios":"A cron expression like '0/60 * * * * ?' or '0-30/65 * * * * ?' where the increment after '/' in the seconds or minutes field is >= 60. The check at line 727 tests incr > 59 with type SECOND or MINUTE.","commonSituations":"Computing an increment dynamically and accidentally producing a value >= 60, or misunderstanding the range of the seconds/minutes field.","solutions":["Lower the increment to 59 or less for seconds/minutes fields.","If you need a longer interval, move the logic to the hours or days field (e.g., every 2 hours instead of every 120 minutes).","Validate step values against the field's maximum before building the cron string."],"exampleFix":"// before\n\"0/75 * * * * ?\"\n// after\n\"0/15 * * * * ?\"","handlingStrategy":"validation","validationCode":"// Validate step increments for seconds (field 0) and minutes (field 1)\nString[] parts = cron.trim().split(\"\\\\s+\");\nfor (int idx : new int[]{0, 1}) {\n    if (parts.length > idx && parts[idx].contains(\"/\")) {\n        int step = Integer.parseInt(parts[idx].substring(parts[idx].indexOf(\"/\") + 1));\n        if (step > 59) throw new IllegalArgumentException(\"Second/minute step must be <= 59: \" + step);\n    }\n}","typeGuard":"boolean isValidSecondMinuteStep(String field) {\n    if (!field.contains(\"/\")) return true;\n    int step = Integer.parseInt(field.substring(field.indexOf(\"/\") + 1));\n    return step >= 1 && step <= 59;","tryCatchPattern":"try {\n    new CronExpression(cron);\n} catch (ParseException e) {\n    if (e.getMessage().contains(\"Increment >= 60\")) {\n        // reduce the step to 59 or less\n    }\n}","preventionTips":["Clamp seconds/minutes step values to 1-59 before building the expression.","For intervals >= 60 seconds, move the logic to the minutes or hours field.","Add input validation in any UI or API that accepts cron step values."],"tags":["cron","validation","increment","range"],"backgroundTag":null,"analyzedSha":"e74c784f68f81fa89cb350913ef15794865d7b12","analyzedAt":"2026-08-14T04:22:43.715Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}