API reference › @evolu/common › Schedule › intersectSchedules
function intersectSchedules<OutputA, OutputB, Input>(
a: Schedule<OutputA, Input>,
b: Schedule<OutputB, Input>,
): Schedule<[OutputA, OutputB], Input>;
Defined in: packages/common/src/Schedule.ts:1288
Combines two schedules with AND semantics.
Continues only while both schedules want to continue. Uses the maximum delay.
Example
// Retry up to 5 times AND within 30 seconds (both conditions must be met)
const both = intersectSchedules(
take(5)(exponential("1s")),
maxElapsed("30s")(forever),
);