jonnify·echd /echd/bus/jobs

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.

Vision · real substrate

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.

§1

The module

docs/echo_mq/specs/emq1/emq.1/emq.1.md · specs/emq2/emq.4 · emq.5

Cron 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.

§2

The job system, drawn

hover a supersession
Cron and queues, both superseded by branded jobs · the job system · hover to read
the scheduler — enqueue_at / enqueue_in · Repeat · the Pump promotes each occurrence a fresh JOB mint · on the server clock ⇐ cron claim — a lease with the attempts fence · retry with backoff fair lanes rotate groups · the Metronome parks, never polls ⇐ task queues batches + locks — @bclaim many at once · the partitioned finish extend / release the lease · reclaim a dead worker's lock ⇐ task queues cron and queues become branded jobs — minted, leased, claimed, finished
The scheduler — cron, superseded. A one-shot is enqueue_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.
Claim — task queues, superseded. Work is claimed, not taken: one atomic move leases a job with its 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.
Batches and locks — the bulk path. @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.

§3

The dives

three moves down

← Back to modules

§4

Doors

the families in depth
§5

References

sources · related

Sources

Related