Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-job-scheduler

Distributed Job & Cron Scheduler Internals (Time Wheels, Leases & Fencing)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Distributed Job & Cron Scheduler Internals (Time Wheels, Leases & Fencing) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-job-scheduler/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-job-scheduler)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-job-scheduler)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-job-scheduler" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Distributed Job & Cron Scheduler Internals (Time Wheels, Leases & Fencing) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Scheduled Workflows"]
  n1_1[("Partitioned Time Store")]
  n2a_2["Lease & Fence Claimer"]
  n2b_3[("Dispatch Queue")]
  n3_4[("Execution Ledger")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Poll due · SQL"| n1_1
  n1_1 -->|"2a. Claim job · CAS"| n2a_2
  n1_1 -.->|"2b. Dispatch · Kafka/SQ"| n2b_3
  n2a_2 -->|"3a. Log run · Audit"| n3_4
  n2b_3 -->|"3b. Sync · Control"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Scheduled WorkflowsSTATELESS
    1M+ Cron & Delayed Jobs
  • Partitioned Time StoreSTATEFUL
    Indexed by
  • Lease & Fence ClaimerSTATELESS
    FOR UPDATE SKIP LOCKED claim
  • Dispatch QueueSTATEFUL
    Idempotent execution envelope
  • Execution LedgerSTATEFUL
    Tracks run history, jitter & SLA
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Scheduled Workflows → Partitioned Time Store (Poll due)[SQL]
  2. Partitioned Time Store → Lease & Fence Claimer (Claim job)[CAS]
  3. Partitioned Time Store → Dispatch Queue (Dispatch)[Kafka/SQ]
  4. Lease & Fence Claimer → Execution Ledger (Log run)[Audit]
  5. Dispatch Queue → Execution Ledger (Sync)[Control]
  6. Execution Ledger → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →