# `AgentWorkshop.Scheduler`
[🔗](https://github.com/joshrotenberg/agent_workshop/blob/main/lib/agent_workshop/scheduler.ex#L1)

Periodic task scheduler for Workshop agents.

Runs agent prompts on a recurring interval. Each schedule is a
GenServer that calls `cast/2` on each tick.

## Usage from IEx

    import AgentWorkshop.Workshop

    every(:monitor, "Check CI status", interval: :timer.minutes(5))
    schedules()          # list active schedules
    cancel(:monitor)     # stop a schedule

## Behavior

- Each tick calls `cast(name, prompt)` (non-blocking)
- If the agent is busy (cast queued), the tick is skipped
- Schedules survive agent resets but not Workshop restarts
- PubSub event `{:schedule, :tick, name}` on each run

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
