Package: effect
Module: Schedule
Returns a schedule that recurs once after the specified duration.
When to use
Use when you need a schedule that recurs once after a fixed delay.
Details
The schedule outputs the configured duration for its first recurrence and then completes.
Example (Recurring once after a duration)
import { Console, Effect, Schedule } from "effect"
const program = Effect.repeat(
Console.log("runs again after one second"),
Schedule.duration("1 second")
)
See
during for recurring until a duration has elapsedSignature
declare const duration: (durationInput: Duration.Input) => Schedule<Duration.Duration>
Since v2.0.0