flowable/flowable-engine · error · ParseException
Support for specifying 'L' with other days of the week is no
Error message
Support for specifying 'L' with other days of the week is not implemented
What it means
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.
Source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java:498
if (years == null) {
years = new TreeSet<>();
}
int exprOn = SECOND;
StringTokenizer exprsTok = new StringTokenizer(expression, " \t", false);
while (exprsTok.hasMoreTokens() && exprOn <= YEAR) {
String expr = exprsTok.nextToken().trim();
// throw an exception if L is used with other days of the month
if (exprOn == DAY_OF_MONTH && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(",")) {
throw new ParseException(
"Support for specifying 'L' and 'LW' with other days of the month is not implemented", -1);
}
// throw an exception if L is used with other days of the week
if (exprOn == DAY_OF_WEEK && expr.indexOf('L') != -1 && expr.length() > 1 && expr.contains(",")) {
throw new ParseException(
"Support for specifying 'L' with other days of the week is not implemented", -1);
}
if (exprOn == DAY_OF_WEEK && expr.indexOf('#') != -1
&& expr.indexOf('#', expr.indexOf('#') + 1) != -1) {
throw new ParseException("Support for specifying multiple \"nth\" days is not implemented.", -1);
}
StringTokenizer vTok = new StringTokenizer(expr, ",");
while (vTok.hasMoreTokens()) {
String v = vTok.nextToken();
storeExpressionVals(0, v, exprOn);
}
exprOn++;
}
if (exprOn <= DAY_OF_WEEK) {
throw new ParseException("Unexpected end of expression.", expression.length());View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before String cron = "0 0 12 ? * MON,FRI,L"; // unsupported // after String cron = "0 0 12 ? * MON,FRI"; // schedule the 'L' case with a second timer '0 0 12 ? * SAT' if needed
Defensive patterns
Strategy: validation
Validate before calling
String dow = fields[5];
if (dow.indexOf('L') != -1 && dow.contains(",")) throw new IllegalArgumentException("L cannot be combined in a day-of-week list"); Try / catch
try { new CronExpression(expr, clockReader); }
catch (ParseException e) { if (e.getMessage().contains("'L' with other days")) { /* fix day-of-week field */ } throw e; } Prevention
- 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
When it happens
Trigger: new CronExpression(expr, clockReader) where the 6th field (day-of-week) contains 'L' plus a comma, e.g. '0 0 12 ? * FRI,L'.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Support for specifying 'L' and 'LW' with other days of the m
- Support for specifying multiple "nth" days is not implemente
- Unexpected end of expression.
- Support for specifying both a day-of-week AND a day-of-month
- Failed to parse scheduler expression:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2c9f832fa1975428.
Report an issue: GitHub.