# `PhoenixKit.Notifications.DigestWorker`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.13.7/lib/phoenix_kit/notifications/digest_worker.ex#L1)

Aggregation engine: sends batched notification **summaries** for types a user
put on a digest cadence (hourly / 12h / daily / weekly) instead of getting
pinged for each event.

One cron entry per cadence enqueues this worker with `%{"cadence" => "hourly"}`
etc. The window is simply the cadence period (the hourly cron counts the last
hour, daily the last day, …) — so there's **no per-user last-sent state** to
track. For each user who routes a type to a channel on this cadence, it counts
that type's events in the window from the activity log and, if any, delivers a
single summary ("You have 1,432 new likes in the last hour.") via the channel.

Only activity-driven types aggregate — standalone notifications are always
immediate. Immediate cadences never reach here (they enqueue `DeliveryWorker`
at creation time).

---

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