Anyone know of a kotlin job scheduler library? Try...
# random
c
Anyone know of a kotlin job scheduler library? Trying to run some stuff on a server every x minutes. Seems like a job scheduler library is what most recommend
a
I don't but why not just coroutines?
y
I think if you just do
delay(x.minutes)
in an infinite loop you should be fine lol
5
👍🏾 1
j
I've used this library: https://github.com/jmrozanec/cron-utils and I'm happy with it
c
i was going to just use coroutines, but i asked my question in ktor, and people said job scheduler. so i figured id ask just incase theres some standard im missing
👍 2
r
My go to solution for that now is a POST endpoint that does the work and a separate task that hits it on a schedule - an ECS task or a K8S job or whatever Heroku calls a scheduled thing. Just a curl container and the platform takes responsibility for scheduling when it runs. Very easy to test.
👍 1