alonsodomin / cron4s

Cross-platform CRON expression parsing for Scala
https://alonsodomin.github.io/cron4s
Apache License 2.0
120 stars 24 forks source link

cron4s.ParseFailed: blank expected at position 4 but found '/' #490

Open Raistnik opened 1 year ago

Raistnik commented 1 year ago
import cron4s._
val cron = "0 15/5 14 * * ?"
val expr = Cron(cron)
println(expr.toString())

why I can't set every 15/5? Not even 1/5 or 5/5 seems to work. Is it not supported in spec? Version 0.6.1

i10416 commented 1 year ago

It does not seem a standard cron expression though some dialects support it see https://crontab.guru/#0_15/514__?

Hmm, / won't working... for cron4s (AFAIK) in 0.5.0 and 0.6.1🤔

i10416 commented 1 year ago

Ah, I think you need to explicitly specify range(e.g. 0 15-23/5 14 * * ?).

https://crontab.guru/#0_15-23/5_14_*_*