{"record":{"id":"b3a984293eeb9ce0","repo":"jeecgboot/JeecgBoot","slug":"increment-24-incr","errorCode":null,"errorMessage":"Increment >= 24 : {incr}","messagePattern":"Increment >= 24 : (.+?)","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":730,"sourceCode":"                    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()) {\n            addToSet(val, end, -1, type);\n            return i;","sourceCodeStart":712,"sourceCodeEnd":748,"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#L712-L748","documentation":"checkIncrementRange rejects a step value greater than 23 for the HOUR field, since hours range 0-23. A '/24' or '/48' step is invalid. Message echoes the increment.","triggerScenarios":"Hour step out of range: '0 0 0/24 * * ?', '0 0 0/48 * * ?', or a computed hourly interval > 23 placed in the hour field.","commonSituations":"Trying to express 'every day at a time' as a 24-hour step (instead use a dom step or just a fixed hour); dynamic interval math that overflows the hour range; confusing hours with days.","solutions":["Cap hour steps at 23; common ones are '/2', '/4', '/6', '/12'.","For 'every N days at HH:MM' use the day-of-month field with a step (e.g. '0 0 8 1/2 * ?' = every 2 days at 08:00).","Clamp computed hourly steps to 1-23."],"exampleFix":"// before - hour step > 23\nString cron = \"0 0 0/24 * * ?\";  // Increment >= 24 : 24\n\n// after - every 12 hours\nString cron = \"0 0 0/12 * * ?\";","handlingStrategy":"validation","validationCode":"// HOUR field step must be <= 23.\npublic static String validateHourStep(String hourField) {\n    return validateStepRange(hourField, 23);\n}\n// (validateStepRange as defined in error 295)","typeGuard":"public static boolean hourStepValid(String hourField) {\n    return stepWithinMax(hourField, 23);\n}","tryCatchPattern":"try {\n    new CronExpression(expr);\n} catch (ParseException e) {\n    if (e.getMessage().startsWith(\"Increment >= 24\")) {\n        return \"Hour steps must be <= 23; for multi-day intervals use the day-of-month step. \" + e.getMessage();\n    }\n    throw e;\n}","preventionTips":["Clamp hour steps to 23; use '/2', '/4', '/6', '/12' for common cadences.","For 'every N days at HH:MM', put the step in dom, not hours.","Validate hour-step bounds in the cron builder before submission."],"tags":["cron","xxl-job","step-operator","hours","validation","parse-error"],"backgroundTag":null,"analyzedSha":"96fb33f5ec68516da0b0147da06b2eb0419e063a","analyzedAt":"2026-08-14T00:04:16.786Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}