The schedule I'm trying to make would have to:
- Start after a specified delay
- Repeat at a fixed rate
- Terminate if it reaches given time limit or encounters terminating state
So what I have is (2.) and (3.):
val repeatUntilTimeLimitReached =
ZSchedule
.fixed(config.pollingConfig.pollInterval)
.untilOutput(pollingTimeLimitReached)
val untilTermination = Schedule.doUntil[RebootState](_.terminatesPolling)
val schedule = repeatUntilTimeLimitReached *> untilTermination
I tried ZSchedule.delayed(), but it seems to add delay to subsequent schedules too.
So is there any way to add intial delay to ZSchedule ?