{"record":{"id":"2c9f832fa1975428","repo":"flowable/flowable-engine","slug":"support-for-specifying-l-with-other-days-of-the","errorCode":null,"errorMessage":"Support for specifying 'L' with other days of the week is not implemented","messagePattern":"Support for specifying 'L' with other days of the week is not implemented","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java","lineNumber":498,"sourceCode":"            if (years == null) {\n                years = new TreeSet<>();\n            }\n\n            int exprOn = SECOND;\n\n            StringTokenizer exprsTok = new StringTokenizer(expression, \" \\t\", false);\n\n            while (exprsTok.hasMoreTokens() && exprOn <= YEAR) {\n                String expr = exprsTok.nextToken().trim();\n\n                // throw an exception if L is used with other days of the month\n                if (exprOn == DAY_OF_MONTH && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(\",\")) {\n                    throw new ParseException(\n                            \"Support for specifying 'L' and 'LW' with other days of the month is not implemented\", -1);\n                }\n                // throw an exception if L is used with other days of the week\n                if (exprOn == DAY_OF_WEEK && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(\",\")) {\n                    throw new ParseException(\n                            \"Support for specifying 'L' with other days of the week is not implemented\", -1);\n                }\n                if (exprOn == DAY_OF_WEEK && expr.indexOf('#') != -1\n                        && expr.indexOf('#', expr.indexOf('#') + 1) != -1) {\n                    throw new ParseException(\"Support for specifying multiple \\\"nth\\\" days is not implemented.\", -1);\n                }\n\n                StringTokenizer vTok = new StringTokenizer(expr, \",\");\n                while (vTok.hasMoreTokens()) {\n                    String v = vTok.nextToken();\n                    storeExpressionVals(0, v, exprOn);\n                }\n\n                exprOn++;\n            }\n\n            if (exprOn <= DAY_OF_WEEK) {\n                throw new ParseException(\"Unexpected end of expression.\", expression.length());","sourceCodeStart":480,"sourceCodeEnd":516,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java#L480-L516","documentation":"The same guard as the day-of-month 'L' check, applied to the day-of-week field: an expression like 'MON,L' (length > 1, contains 'L' and a comma) is rejected because 'L' in day-of-week (last day of week, or nL) combined with other listed days is not implemented. Thrown as ParseException from buildExpression.","triggerScenarios":"new CronExpression(expr, clockReader) where the 6th field (day-of-week) contains 'L' plus a comma, e.g. '0 0 12 ? * FRI,L'.","commonSituations":"Attempting 'last Friday plus other days' in one cron field; expression ported from a cron implementation with richer 'L' support; typo leaving a stray 'L' inside a day list.","solutions":["Remove 'L' from the day-of-week list; list only concrete day names/numbers","Use a dedicated expression like '0 0 12 ? * FRI' for the last-weekday need and a second schedule for extra days","Use the 'nL' form (e.g. '6L' = last Friday) alone in the field if that matches the intent"],"exampleFix":"// before\nString cron = \"0 0 12 ? * MON,FRI,L\"; // unsupported\n// after\nString cron = \"0 0 12 ? * MON,FRI\"; // schedule the 'L' case with a second timer '0 0 12 ? * SAT' if needed","handlingStrategy":"validation","validationCode":"String dow = fields[5];\nif (dow.indexOf('L') != -1 && dow.contains(\",\")) throw new IllegalArgumentException(\"L cannot be combined in a day-of-week list\");","typeGuard":null,"tryCatchPattern":"try { new CronExpression(expr, clockReader); }\ncatch (ParseException e) { if (e.getMessage().contains(\"'L' with other days\")) { /* fix day-of-week field */ } throw e; }","preventionTips":["Keep 'L' or 'nL' alone in the day-of-week field","Express 'last X plus other days' as two separate schedules","Review cron dialect differences when porting expressions"],"tags":["cron","unsupported-feature","flowable","quartz"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}