Adam Hurwitz
12/30/2019, 10:57 PMcy
12/31/2019, 9:46 AMTanVD
12/31/2019, 10:17 AM@Scheduled
in #kotless. It will also support cloud-based Cron jobs for Ktor starting with 1.3.0Adam Hurwitz
12/31/2019, 4:08 PMCoroutine
inside the Application.main
method to populate data on a given time frequency.
Would this implementation work?
import io.ktor.application.Application
fun Application.main() {
// Coroutine with a loop and delay here.
}
cy
12/31/2019, 4:09 PMfun Application.main() {
launch {
// polling loop goes here
}
}
Adam Hurwitz
12/31/2019, 4:12 PMGlobalScope
or Application
scope?launch
could be something as simple as while(true) { ... }