shyiko / skedule

A human-friendly alternative to cron. Designed after GAE's schedule for Kotlin and/or Java 8+.
84 stars 7 forks source link

Doesn't work with x-st of month #3

Closed sjurba closed 5 years ago

sjurba commented 5 years ago

val schedule = parse("first monday of month 09:00"); Fails:

Exception in thread "main" com.github.shyiko.skedule.InvalidScheduleException: "month" isn't a valid month
    at com.github.shyiko.skedule.internal.ScheduleImpl.parseMonth(ScheduleImpl.kt:113)
    at com.github.shyiko.skedule.internal.ScheduleImpl.parse(ScheduleImpl.kt:173)
    at com.github.shyiko.skedule.Schedule.parse(Schedule.java:36)
    at no.entro.subscriptions.scheduling.SchedulerKt.main(Scheduler.kt:8)
    at no.entro.subscriptions.scheduling.SchedulerKt.main(Scheduler.kt)
sjurba commented 5 years ago

FTR. I know you can use "first monday 09:00" instead, but using "of month" is more clear and is also supported and documented by GAE.

shyiko commented 5 years ago

Included in 0.4.0.