Skip to content

Infinite loop for pattern to execute SUN-FRI #150

@rudivk

Description

@rudivk

I recently changed my cron pattern from "0 15 0 ? * MON-FRI *" to "0 15 0 ? * SUN-FRI *".
I tried the syntax with https://www.freeformatter.com/cron-expression-generator-quartz.html and that seemed to work fine.
However, when my felix server is starting up and passes the cron pattern onto enroute, the startup thread seems to be blocked (infinite loop) while parsing the pattern.

Is this a bug on your end or should I be using another pattern to execute my job at 00:15 except on all days of the week except Saturday?

For completeness' and clarity's sake, I thought I'dd add the stacktrace:

“FelixStartLevel” #19 daemon prio=5 os_prio=0 tid=0x00007f5964439800 nid=0x1140 runnable [0x00007f594b0c2000]
java.lang.Thread.State: RUNNABLE
at java.time.temporal.ValueRange.isValidIntValue(ValueRange.java:295)
at java.time.temporal.ValueRange.checkValidIntValue(ValueRange.java:329)
at java.time.temporal.ChronoField.checkValidIntValue(ChronoField.java:722)
at java.time.LocalDate.ofEpochDay(LocalDate.java:341)
at java.time.LocalDate.plusDays(LocalDate.java:1351)
at java.time.LocalDate.plus(LocalDate.java:1238)
at java.time.LocalDateTime.plus(LocalDateTime.java:1194)
at java.time.ZonedDateTime.plus(ZonedDateTime.java:1602)
at java.time.ZonedDateTime.plus(ZonedDateTime.java:164)
at osgi.enroute.scheduler.simple.provider.CronAdjuster$Field.isOk(CronAdjuster.java:54)
at osgi.enroute.scheduler.simple.provider.CronAdjuster.adjustInto(CronAdjuster.java:478)
at java.time.ZonedDateTime.with(ZonedDateTime.java:1245)
at osgi.enroute.scheduler.simple.provider.InternalSchedulerImpl$ScheduleCron.next(InternalSchedulerImpl.java:242)
at osgi.enroute.scheduler.simple.provider.InternalSchedulerImpl.schedule(InternalSchedulerImpl.java:275)
at osgi.enroute.scheduler.simple.provider.InternalSchedulerImpl$Cron.(InternalSchedulerImpl.java:303)
at osgi.enroute.scheduler.simple.provider.InternalSchedulerImpl.addSchedule(InternalSchedulerImpl.java:324)
- locked <0x00000005ca20e5c8> (a java.util.ArrayList)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions