echd — Echo on Encore · E3.3
Jobs Supersede Cron and Queues
Cron and task queues are one idea on this bus — a branded job: minted when due, claimed under a lease, rotated fairly, and finished — so both closed primitives become the same trackable unit of work.
echd speaks in the present tense over a build ladder. Every module, verb, key, and port named on this page is real; the composition into one standing platform is the vision the ladder builds.
The module
docs/echo_mq/specs/emq1/emq.1/emq.1.md · specs/emq2/emq.4 · emq.5Cron and task queues look like two different Encore primitives, but on this bus they are one idea: a job. A cron entry does not fire a function; it registers a recurrence, and each occurrence is minted as a fresh branded JOB — a real, trackable, retryable unit of work, not an anonymous tick. A task is not handed to a worker; it is claimed under a lease. Both collapse into the same lifecycle: a job is minted, made visible when it is due, claimed, and finished.
Turn the two supersessions and the shared machinery shows. Scheduling is a visibility fence over a schedule set — enqueue_at and enqueue_in for one-shots, EchoMQ.Repeat for recurrences, a supervised EchoMQ.Pump promoting due work on the server's clock. Execution is a claim — an atomic lease with the attempts counter as its fencing token, retried with backoff, rotated fairly across groups by the EchoMQ.Metronome that parks instead of polling, and drained in bulk by batches whose leases are renewed and released together. Cron becomes a mint; a queue becomes a claim; and both are branded jobs the whole way down.
The job system, drawn
hover a supersessionenqueue_at or enqueue_in; a recurrence is EchoMQ.Repeat, and its every occurrence is a fresh JOB mint — not a function fired, but a job created. A supervised pump, EchoMQ.Pump, promotes due work on the server's clock. Cron fires; the scheduler mints.attempts counter as the fencing token, and retry backs off. Many groups share one queue fairly — lanes rotate on a ring and the EchoMQ.Metronome parks a blocked consumer instead of polling.@bclaim claims many jobs in one round trip and the partitioned finish settles them per item. The lock is the lease: extendLock renews it, releaseLock frees it, extendLocks renews a whole batch, and a stalled-job sweep reclaims the lease of a worker that died.Hover or focus a supersession to read it; click to pin. Without scripting, all three read in sequence.
The dives
three moves downA Fresh Mint Each Occurrence
Cron superseded — a recurrence registers, and every occurrence is a fresh branded JOB the Pump promotes on the server clock.
D2Fair Lanes and the Metronome
Queues superseded — a claim is a lease with a fencing token; lanes rotate groups fairly and the Metronome parks, never polls.
D3Batches and Locks
The bulk path — @bclaim many at once, the partitioned finish, and the lock that is the lease: extend, release, reclaim.
Doors
the families in depthEchoMQ — the protocol, in depth
The scheduling, claim, retry, groups, batches, and locks families verb by verb — enqueue_at, Repeat, the Metronome, bclaim, extendLock.
six families, filled — the job system this module compresses.
/redis-patternsRedis Patterns, Applied
Reliable queues, delayed jobs, and fair scheduling as patterns — the judgement beneath claim, retry, and the ring.
claim, lease, backoff — the reliable-queue pattern, disciplined.
References
sources · relatedSources
- Valkey — Data typesthe sorted sets and lists the schedule set, the lanes, and the ring are built from
- Valkey — BLPOPthe blocking pop the Metronome parks on instead of polling
Related
- EchoMQ — the protocol, in depththe scheduling, claim, batch, and lock families at full resolution
- E3.2 — Streams Supersede PubSubthe sibling supersession: PubSub becomes the stream tier
- E3 — The Bus — EchoMQ Supersedesthe chapter this module sits in
- echd — the course homethe supersession switchboard