无法使用 cron-utils 生成 cron 表达式

Unable to generate the cron expression using cron-utils

我正在使用 cron-utils jar 生成 cron 表达式

0 0 8 ? 1/1 5#3 *

每个月的第 3 个星期四 8 点

下面是我对上述表达式的代码:

CronBuilder withMonth = CronBuilder.cron(
      CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ)
).withYear(always()).withDoM(QuestionMark.questionMark())
.withMonth(on(3, SpecialChar.HASH));

withMonth.withDoW(on(5)).withHour(on(8)).withMinute(on(0)).withSecond(on(0));
    
Cron instance = withMonth.instance();
System.out.println(instance.asString());

但我遇到以下异常:

value missing for a#b cron expression

终于找到解决方案

.withDoW(on(NUM_DAY_WEEK,SpecialChar.HASH, NUM_DAY_MONTH);

会生成5#3