krontab icon indicating copy to clipboard operation
krontab copied to clipboard

`java.time.Duration` as a time period?

Open mangatmodi opened this issue 4 years ago • 6 comments

Thanks for the amazing library. Do you see value in providing an API to schedule the task with a java.time.Duration time period? I understand that it is not exactly a crontab format.

I could contribute if you agree to the proposal.

mangatmodi avatar Dec 08 '21 12:12 mangatmodi

Welcome with your first issue

github-actions[bot] avatar Dec 08 '21 12:12 github-actions[bot]

Hello, thanks for your issue :) No, I still didn't thought about it, but I will :) thank yiu for an idea

InsanusMokrassar avatar Dec 08 '21 12:12 InsanusMokrassar

Hello again :) sorry for that delay. Currently it looks like you want something like this:

val kronScheduler = buildScheduler(Duration.ofSeconds(1L))
kronScheduler.doInfinity {
    println(it) // will print each second
}

Is it how do you see future realization?

InsanusMokrassar avatar Apr 06 '22 06:04 InsanusMokrassar

Closed due to inactivity and unclear state of issue idea

InsanusMokrassar avatar Jun 15 '22 07:06 InsanusMokrassar

Hey I apologise. I took a long timeoff from coding. I am back now. Yes. Your idea is perfectly what I meant. To be honest, I tried to do it myself, but I didn't reach anywhere.

Any chance to open up the ticket? I will be happy to help too, if you could point me in the right direction.

mangatmodi avatar Jun 27 '23 12:06 mangatmodi

Hi :) glad to see you again :) Issue is open. If you want, you may try to create new KronScheduler and use it in buildScheduler based on Duration

InsanusMokrassar avatar Jun 27 '23 18:06 InsanusMokrassar