# `AshWorkflow.Transformers.AddScheduler`
[🔗](https://github.com/team-alembic/ash_workflow/blob/v0.12.0/lib/ash_workflow/transformers/add_scheduler.ex#L1)

Describes the workflow's scheduled work, then hands it to the selected
scheduler.

Every automatic step, every timeout and every `every` becomes one
`AshWorkflow.Scheduler.Work`. The scheduler's `transform/3` then adds whatever
it needs to the resource — `AshWorkflow.Scheduler.Oban` adds AshOban triggers,
another implementation might add nothing at all.

This transformer owns the translation from workflow vocabulary into `Work`,
which is the whole reason a scheduler needs no understanding of steps,
transitions or the state machine. It replaces
`AshWorkflow.Transformers.AddObanTriggers`, which built triggers directly.

## `match` and `deadline`

Each `Work` carries both, because the two sensible scheduling strategies read
opposite ones. `match` selects records eligible now, for an implementation
that polls. `deadline` is the rule for computing the exact instant, for an
implementation that arms timers. For a timeout they describe the same fact:
`match` is true exactly when `deadline` has passed.

# `after?`

# `after_compile?`

# `before?`

# `transform`

---

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