doOnce

inline suspend fun <T> KronScheduler.doOnce(noinline block: suspend () -> T): T

Execute block once at the KronScheduler.next time and return result of block calculation.

WARNING!!! If you want to launch it in parallel, you must do this explicitly.

WARNING!!! In case if KronScheduler.next of this instance will return null, block will be called immediately

inline suspend fun <T> doOnce(scheduleConfig: String, noinline block: suspend (DateTime) -> T): T
inline suspend fun <T> doOnce(scheduleConfig: String, noinline block: suspend () -> T): T

Will buildSchedule using scheduleConfig and call doOnceLocal on it

See also