Applying Conditional Schedule in Effect Pipe Using Effect.if
In the same way, I would like to apply a conditional schedule
myEffectFunction().pipe( Effect.tap(() => anotherFunction()), Effect.retry(Schedule.spaced(Duration.seconds(5))), Effect.repeat(Schedule.spaced(Duration.weeks(1))), // <<-- I would like this Schedule to be applied only when flag === true)
myEffectFunction().pipe( Effect.tap(() => anotherFunction()), Effect.retry(Schedule.spaced(Duration.seconds(5))), Effect.repeat(Schedule.spaced(Duration.weeks(1))), // <<-- I would like this Schedule to be applied only when flag === true)