https://kotlinlang.org logo
#ktor
Title
# ktor
w

wilyarti

01/19/2019, 9:46 AM
I know this is beyond the scope of ktor but would it be possible to run a process that is on an infinite loop as a co-routine spawned by a route (or a background thread launched every X minutes)? I ask as I am currently running 2 jars and they both share a lot of libraries... If I could start/stop it from a route that would be great awesome.
g

gotoOla

01/21/2019, 3:08 PM
couldn’t you have a https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.concurrent/fixed-rate-timer.html that is triggered through an endpoint?
👍 1