API reference › @evolu/common › Task › RepeatOptions
Defined in: packages/common/src/Task.ts:4050
Options for repeat.
Properties
onRepeat?
readonly optional onRepeat?: (attempt: RepeatAttempt<T, Output>) => void;
Defined in: packages/common/src/Task.ts:4068
Runs before each scheduled repeat.
attempt is the completed attempt that caused this repeat, not the
upcoming attempt number. The callback runs after
RepeatOptions.shouldRepeat and the Schedule approve a repeat,
and before the repeat delay. The callback must not throw: a thrown
exception is a defect that panics the Run tree.
shouldRepeat?
readonly optional shouldRepeat?: Predicate<T>;
Defined in: packages/common/src/Task.ts:4057
Decides whether an Ok value should schedule another repeat.
The predicate must not throw: a thrown exception is a defect that panics the Run tree.