repeatOrElse

open suspend fun repeatOrElse(block: suspend () -> Input, orElse: suspend (error: Throwable, output: Output?) -> Output): Output

Repeat the schedule, and uses block as Input for the step function. If the step function throws an exception, it will be caught and passed to orElse.