{"record":{"id":"2eb23729db0d37c4","repo":"alibaba/spring-cloud-alibaba","slug":"increment-60","errorCode":null,"errorMessage":"Increment > 60 : {}","messagePattern":"Increment > 60 : (.+?)","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":436,"sourceCode":"\t\t\t}\n\t\t\telse if (c == '*') {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tc = s.charAt(i);\n\t\t\tif (c == '/') { // is an increment specified?\n\t\t\t\ti++;\n\t\t\t\tif (i >= s.length()) {\n\t\t\t\t\tthrow new ParseException(\"Unexpected end of string.\", i);\n\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","sourceCodeStart":418,"sourceCodeEnd":454,"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#L418-L454","documentation":"Thrown when a step value after '/' exceeds 59 in the SECOND or MINUTE field (guard at CronExpression.java:435-436). The parser reads the increment with getNumericValue and rejects steps larger than the field maximum. Note the message text says '> 60' even though the check is `incr > 59`, and message building appends the actual value.","triggerScenarios":"`new CronExpression(\"*/70 * * * * ?\")` (seconds step 70), or `new CronExpression(\"0 */70 * * * ?\")` (minutes step 70). Any `*/NN` or `N/NN` in the seconds or minutes field where NN > 59.","commonSituations":"Developer confuses cron step semantics (e.g. wants 'every 90 seconds' which cron cannot express directly) or copies a seconds value into a step. Typical when migrating from a UI that allowed arbitrary intervals.","solutions":["Keep seconds/minutes step <= 59, e.g. '*/70' -> '*/59' or, for 'every 90 seconds', split into multiple triggers or use a higher-level scheduler.","Double-check the field position: a misplaced step in the seconds field is the usual cause.","Validate step bounds per field before constructing the expression."],"exampleFix":"// before\nnew CronExpression(\"*/90 * * * * ?\");\n// after\nnew CronExpression(\"*/30 * * * * ?\"); // every 30 seconds","handlingStrategy":"validation","validationCode":"// Per-field max step map; check the seconds/minutes step <= 59 here.\nstatic 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":["Remember cron cannot express 'every N>59 seconds' in one trigger.","Cap seconds/minutes step inputs at 59 in UIs and validators.","For sub-minute intervals beyond a minute, split into multiple jobs."],"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"}