I want to run a periodic task. In Spring MVC it works flawlessly.
Now I want to integrate Spring Webflux + Kotlin Coroutines.
How can I call suspended functions in the @Scheduled
method? I want it to wait until the suspended function is finished.
/// This function starts every 00:10 UTC
@Scheduled(cron = "0 10 0 * * *", zone = "UTC")
fun myScheduler() {
// ???
}
suspend fun mySuspendedFunction() {
// business logic
}