Skip to content

Instantly share code, notes, and snippets.

@NyCodeGHG
Created September 23, 2021 12:05
Show Gist options
  • Save NyCodeGHG/0f662dee584d39a29d1de4264da45424 to your computer and use it in GitHub Desktop.
Save NyCodeGHG/0f662dee584d39a29d1de4264da45424 to your computer and use it in GitHub Desktop.
import dev.inmo.krontab.buildSchedule
import dev.inmo.krontab.doWhile
import kotlinx.coroutines.runBlocking
fun main() {
val start = System.currentTimeMillis()
runBlocking {
buildSchedule("/5 * * * *").doWhile {
println("hello")
start + 16 * 1000 > System.currentTimeMillis()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment