# fromSchedule

Creates an Fx that emits values according to a Schedule.
The Fx emits `void` each time the schedule fires.

## Signatures

```ts
export declare const fromSchedule: <Error, Env>(schedule: Schedule<unknown, unknown, Error, Env>) => Fx<void, Error, Env>;
```

## Why

Effect [Schedule](https://effect.website/docs/v4/api/effect/Schedule) values already
encode recurrence, delay, and typed schedule failures. `fromSchedule` exposes
those decisions as producer-driven ticks without another timing model. The
schedule governs all ticks: `Schedule.recurs(2)` emits twice here. In contrast,
`repeat(source, Schedule.recurs(2))` runs an initial source plus two repeats.

## Ownership and lifetime

Construction starts no clock. Running the `Fx` repeatedly invokes the sink under
the schedule and completes when the schedule completes. Schedule failures are
forwarded as causes; interruption cancels waiting and stops further ticks. The
returned `Fx` retains the schedule's `Error` and `Env` channels.

## Examples

```ts
import { Schedule } from "effect"
import { collectAll, fromSchedule } from "@typed/fx/Fx"

const twoTicks = fromSchedule(Schedule.recurs(2))
const program = collectAll(twoTicks) // [undefined, undefined]
```
