↑↓ to navigate Enter to open "…" all these words ANDOR to combine

Architecture Decision Record

ADR-074: Recurring Job Scheduler (Persistent Cron Jobs on the Outbox Claim-Lease Pattern)

Status

Accepted (2026-08-13; revised 2026-08-14, 2026-08-18, 2026-08-31, 2026-10-01). Revised 2026-10-06: the smart-wait and cron-validation statements now match the runner's actual behavior. Revised 2026-10-07: the consumer-adoption statement now names every host that calls AddScheduledJobs and the combined audit-trail migrations that create the table. Revised 2026-10-21: anchors refreshed after the outbox claim path and the ConfigureScheduler mapping moved in source. Revised 2026-10-26: anchors refreshed after the outbox claim path and the consumer AddScheduledJobs calls moved in source. Revised 2026-10-28: anchors refreshed after the ADC Identity host's AddScheduledJobs call moved in source. Revised 2026-11-07: a cron override applies when the host restarts, not on a running host (the runner reads its settings once), and a cron with no next occurrence parks the job; see Revision (2026-11-07). Revised 2026-11-23: anchors refreshed after the outbox claim path, the scheduler runner and settings, the ConfigureScheduler mapping and the consumer AddScheduledJobs calls moved in source. The implementation lands in the MMCA.Common "enterprise capability wave" release and is opt-in: a host calls AddScheduledJobs(configuration) and sets Scheduler:Enabled. Until it does, the framework creates no table and starts no runner.

Context

The framework had two kinds of background work and neither of them is a schedule.

OutboxProcessor (MMCA.Common/Source/Core/MMCA.Common.Infrastructure/Persistence/Outbox/Processing/OutboxProcessor.cs) is durable, multi-replica safe and event-driven: it runs when there is a row to drain, and its cadence is a consequence of writes, not a calendar. ADR-052 is the opposite end: an in-process bounded queue plus a hosted drain, started by a request, lost on restart, scoped to one replica by design. Between them sits work that is neither, and every repo in the workspace had started inventing it locally: purge rows older than N days, reconcile with an external system overnight, recompute a projection before the business day. The available answer was a PeriodicBackgroundService subclass with an interval, which fails on two counts. An interval is not a time of day, so "every 24 hours" drifts with each deploy and lands at whatever hour the last restart happened to be. And an interval-driven hosted service runs on every replica, so scaling a service to three instances silently triples a purge.

ADR-075 forced the question: its change-history table needs a retention purge, and shipping that as one more bespoke hosted service would have made the framework's own recurring work a private implementation of a capability it declines to own. The unrecorded decision was whether to adopt a scheduling product (Hangfire or Quartz.NET) or to extend the durable polling loop already in production.

Decision

The scheduler is the outbox claim-lease pattern applied to cron, not Hangfire and not Quartz.NET

A persistent job store plus a single-runner claim lease, reusing the exact idiom the outbox proved. The outbox claims a batch with an ExecuteUpdateAsync that sets LockedUntil and LockToken in one statement (.../Persistence/Outbox/Processing/OutboxProcessor.cs:375-379, inside ClaimEligibleAsync, :348) over a shared FilterClaimable predicate that admits only eligible, unprocessed rows whose LockedUntil is null or already in the past (:427-433; a batch carrying an ordering key claims through FilterUnblocked, which composes it, :371-373, :442, :447), then re-reads the claimed set by LockToken so a partial claim processes only its own rows (:388-392). A due job is claimed the same way, so two replicas can never run the same occurrence, and a replica that dies mid-run releases its job when the lease expires.

Hangfire would have brought its own schema, its own storage abstraction, a dashboard surface to authorize and host, and a licensing posture that varies by storage provider. Quartz.NET would have brought a large configuration surface and a second scheduling model beside the one the outbox already implements. Both add a dependency that every extracted service host (ADR-008) must be reasoned about separately, in a framework whose extraction story is that a module lifts out without acquiring new infrastructure. The missing piece was a cron expression, not a product.

Cron parsing is the one thing bought rather than built

Cronos (MIT, zero-dependency) is pinned in Directory.Packages.props and parses every expression. Writing a cron parser in-house is out of scope for this wave, and interval-only schedules are below the bar this record exists to clear.

IScheduledJob is the contract, resolved scoped per execution

IScheduledJob (MMCA.Common/Source/Core/MMCA.Common.Application/Interfaces/IScheduledJob.cs) declares Name, CronExpression (a string) and ExecuteAsync(CancellationToken). Nothing else: a job is a name, a schedule and a body. Jobs are resolved through IServiceScopeFactory in a fresh scope per execution, the OutboxProcessor pattern, so a job body gets scoped services (a DbContext, a repository, the correlation context) exactly as a request handler does, and a long-lived runner never captures a scoped dependency.

The job store is one row per job, in the Default source only

ScheduledJobEntry (MMCA.Common/Source/Core/MMCA.Common.Infrastructure/Scheduling/ScheduledJobEntry.cs) carries JobName (the primary key), CronExpression, NextRunOn, LastRunOn, LastOutcome, LastError, LastDurationMs, LockedUntil and LockToken (ScheduledJobEntry.cs:26-74). It is deliberately not an IAuditableEntity: it self-stamps nothing, it is never soft-deleted, and no global query filter reaches it. That falls out of the mapping rather than being asserted: the soft-delete filter is applied only to entity types assignable to IAuditableEntity (.../Persistence/DbContexts/ApplicationDbContext.cs:605, :614), and ConfigureScheduler maps the table with no HasQueryFilter call of its own (:958-994). That is the OutboxMessage precedent: infrastructure rows are not domain rows.

The table lives in the Default source and only there. The outbox exists once per relational database because an outbox row must be written in the same transaction as the aggregate that produced it (ADR-006). A schedule has no such tie: a job belongs to the host that registered it, not to a database, and a per-source job table would give a four-database host four copies of one schedule and four claims for one occurrence.

ScheduledJobRunner is a BackgroundService with a smart wait, not a PeriodicBackgroundService

ScheduledJobRunner (.../Infrastructure/Scheduling/ScheduledJobRunner.cs) subclasses BackgroundService directly, because a fixed period is the wrong shape: after each cycle it waits until the earliest NextRunOn across the store, through TimeProvider, capped by the polling interval and floored at one second (ComputeWaitTime, .../Infrastructure/Scheduling/ScheduledJobRunner.cs:149-163). That mirrors the outbox smart wait: it shortens the sleep when a job falls due before the next poll, so a job starts on time rather than up to one interval late. It does not reduce wakes: because the polling interval is the cap, a host whose only job is nightly still runs a cycle every interval (30 seconds at the default). The cycle is: claim the due jobs with the ExecuteUpdateAsync lease, execute each in a fresh scope, record the outcome and duration on the row, compute the next occurrence with Cronos in UTC, release the lease.

A missed schedule runs once and then advances

A host that was down for six hours does not fire six catch-up runs. When the runner finds a job whose NextRunOn is in the past it executes that job exactly once, then advances NextRunOn to the next occurrence after now, discarding the occurrences that elapsed while the host was gone. A retention purge that missed four nights wants one purge, not four identical passes over a table it already cleaned, and a reconciliation sweep wants current state rather than four replays of it. The cost is in the Trade-offs: a job that must run for every window is not served by this scheduler.

Settings, metrics and registration

SchedulerSettings binds the Scheduler section with Enabled, PollingIntervalSeconds (default 30), LeaseSeconds (default 300) and DataSource, the engine of the Default database that holds the table (default SQLServer; .../Infrastructure/Scheduling/SchedulerSettings.cs:26, :34, :46, :55), through the mandatory AddOptions<T>().Bind(...).ValidateDataAnnotations().ValidateOnStart() chain of ADR-070, so a malformed scheduler section stops the host at boot rather than at 03:00.

SchedulerMetrics (.../Infrastructure/Scheduling/SchedulerMetrics.cs:16) follows the same conventions as OutboxMetrics (.../Persistence/Outbox/Processing/OutboxMetrics.cs:16) under ADR-041: one meter per subsystem, never a second Meter with the same name, and outcomes carried as tags rather than as separate instruments. It is not an instrument-for-instrument copy. The scheduler emits one counter, RunCounter, tagged by job and by outcome (Succeeded, Failed, Skipped), so a failure rate is that counter split by tag rather than a second instrument (:28), plus two histograms: DurationHistogram for execution time in seconds (:39) and LagHistogram for lag, actual start minus NextRunOn (:50). The outbox carries a different set for its own shape: two counters, DeadLetterCounter and ProcessedCounter (OutboxMetrics.cs:41, :47), one histogram, DispatchLagHistogram (:57), and two observable gauges, PendingDepthGauge for backlog depth (:75) and OldestPendingAgeGauge for the age of the oldest row still awaiting dispatch, per data_source (:98). The scheduler has a counterpart for neither, because depth and backlog age are questions about a queue and a schedule has no queue.

Registration is two calls. AddScheduledJobs(configuration) binds the settings and registers the runner; AddScheduledJob<TJob>() adds one job from any module, using the accumulate-across-modules idiom that AddPermissions (MMCA.Common/Source/Presentation/MMCA.Common.API/Authorization/AuthorizationExtensions.cs:115) and its EnsurePermissionRegistry helper (:192, called at :119) already establish. That registration takes no schedule argument (MMCA.Common/Source/Core/MMCA.Common.Infrastructure/DependencyInjection.Jobs.cs:72): the schedule is the job's own CronExpression property, and the one way to retime a shipped job without a release is configuration, the Scheduler:Jobs:{Name}:Cron section bound by SchedulerSettings.Jobs (.../Infrastructure/Scheduling/SchedulerSettings.cs:63) into ScheduledJobOverrideSettings.Cron (:78). The runner resolves the two per job on every cycle, the override when it is present and non-blank and the compiled-in default otherwise (ResolveCronExpression, .../Infrastructure/Scheduling/ScheduledJobRunner.cs:173). The table is created only when the settings flag is on, the same gating ADR-075 uses. Every cycle the registered jobs are upserted by JobName (SyncRegistrationsAsync, :270): a row whose expression changed has the expression rewritten and the next occurrence recomputed from the current instant, and a row whose expression is unchanged is left alone (:290-295). An override applies on restart, not on a running host. The runner reads IOptions<SchedulerSettings>.Value once, at construction (ScheduledJobRunner.cs:47), and every cycle resolves the cron from that copy (:289), so a Scheduler:Jobs:{Name}:Cron edit reaches the table on the first cycle after the host restarts (SchedulerSettings.cs:71-78).

Design-time gets the same flag

DesignTimeDbContextOptions.EnableScheduler (.../Persistence/DbContexts/Design/DesignTimeDbContextOptions.cs:41) is the design-time mirror of Scheduler:Enabled, and DesignTimeDbContextHelper feeds it to the context as a fixed SchedulerSettings (.../Design/DesignTimeDbContextHelper.cs:161-162). Without that flag the design-time model diverges from the runtime model and dotnet ef breaks for every consumer.

The framework dogfoods it

AuditTrailCleanupJob, the retention purge of ADR-075, ships as the framework's first IScheduledJob, so the contract is exercised by the package that defines it before any application depends on it. ADC, Store and Helpdesk all call AddScheduledJobs: ADC in three of its four service hosts (not Notification), Store in all three, Helpdesk in its single service host. The migration set of each host that calls it adds the ScheduledJobs table once, in a migration shared with the ADR-075 audit trail rather than a scheduler-only one, so ADC and Store carry three such migrations each and Helpdesk one.

Rationale

  • The lease is already proven under production load. Multi-replica correctness for recurring work is the hard part, and it was solved once for the outbox: an atomic claim update, a token identifying the claimant's rows, and an expiry that returns a dead replica's work with no operator involvement. Reusing it means the scheduler's riskiest property was verified before it existed.
  • A product dependency is paid for by every host, forever. Hangfire and Quartz.NET are competent, and they are also a schema, a configuration model and an upgrade obligation that each extracted service host inherits. Adding a scheduling server to that list would have cost more than the code it replaced.
  • A cron string is the interface operators already know. It is portable, it is diffable in configuration, and it expresses "03:15 every day" and "every 15 minutes on weekdays" in one grammar. An interval expresses neither.
  • Persistence is what makes it a schedule instead of a timer. NextRunOn and LastRunOn survive a restart, so a deploy at 02:59 does not skip the 03:00 job and does not re-run it.
  • Cronos is a parser, not a framework. MIT, zero dependencies, no storage or hosting opinion: it turns a string into the next DateTime and nothing else, which is exactly the piece not worth writing.
  • Scoped-per-execution keeps job bodies ordinary. A job that takes an IUnitOfWork looks like any other application code, and nothing about it knows it is on a schedule. The Default source keeps the schedule itself in one place, since jobs are host-scoped facts and per-database copies would only contend.
  • Opt-in keeps the release non-breaking. No table, no runner, no polling and no cost for a host that never calls AddScheduledJobs, which is what lets the capability ship in a lockstep release (ADR-016) that every consumer takes at once.

Trade-offs

  • A polling loop is not a real-time scheduler. Worst-case start lag is one polling interval, 30 seconds at the default, so sub-minute precision is not on offer. A job that must start within a second of its scheduled instant is not what this is.
  • The lease is a time lease, not a fence. A runner that stalls past LeaseSeconds (300 by default) can have its job claimed by another replica while it is still executing. Jobs must therefore be idempotent, the same at-least-once posture ADR-003 demands of event handlers, and a job whose body can exceed the lease should raise LeaseSeconds rather than assume exclusivity.
  • Scheduling depends on the Default database. A service whose module database is perfectly healthy loses all scheduling if its Default source is unavailable, because that is where the claim is taken. That is the price of one schedule per host rather than one per source.
  • No per-job retry policy in v1. A failed run records its outcome and its duration and then waits for the next cron occurrence. There is no backoff curve and no dead-letter equivalent of the outbox's, so a job that fails at 03:00 is simply not done until 03:00 tomorrow unless the job body retries internally.
  • No dashboard, no ad-hoc trigger endpoint, no run-history table. The entry carries the last outcome and duration and nothing before it, so "did this run last Tuesday" is a question for the job's logs or metrics, not the table.
  • Run-once-then-advance silently drops occurrences. A long outage loses every elapsed window but one, with no record that it did. That is right for a purge and wrong for a job that must produce an artifact per window (a nightly export, a per-period invoice run), which has to make the window explicit in its own state rather than infer it from the schedule.
  • Cron is evaluated in UTC only. A daily job holds its UTC instant across a local daylight-saving shift, so a "3am" job becomes a 4am job for half the year in any zone that observes one. Making it zone-aware would put a time zone on every entry and a policy decision on every ambiguous or skipped local hour.
  • Nothing enforces that a cron expression is sensible. A typo that still parses binds a job to a schedule nobody intended, and Cronos parsing is the only check. It runs when the runner syncs registrations on a cycle (ScheduledJobRunner.cs:298), the first one after a 15-second startup delay (:70), not at host startup, and the override setting carries no validation attribute (SchedulerSettings.cs:78). A malformed expression such as * * * * ? ? does not stop the host: it is logged and its row is parked at DateTime.MaxValue with LastOutcome Skipped (ScheduledJobRunner.cs:298-322, :345-368). Parsing cannot catch 0 3 * * 1 written when 0 3 * * * was meant. An expression that parses but has no next occurrence, such as 0 0 31 2 * (31 February), parks the job the same way and more quietly: Cronos returns no occurrence rather than an error (ScheduledJobRunner.cs:187, :198), so the row's NextRunOn becomes DateTime.MaxValue (:316, :345) with no parse-error log line and no Skipped outcome, and the job never runs again until the expression changes.
  • One runner per host, and it is shared. A slow job delays the jobs due behind it, exactly as ADR-052's single-reader drain does for its queue.

Revision (2026-10-01)

No decision or rationale changed. The job-store field list now names LastError, a nullable string the entry already carries (.../Infrastructure/Scheduling/ScheduledJobEntry.cs:57) and maps with a 2048-character cap (.../Persistence/DbContexts/ApplicationDbContext.cs:827). Citations were refreshed to current lines: the outbox claim (OutboxProcessor.cs:378, :401-405, :413-418, FilterClaimable :453-459), the soft-delete filter and ConfigureScheduler (ApplicationDbContext.cs:457, :466, :805-841), AddPermissions and EnsurePermissionRegistry (AuthorizationExtensions.cs:103, :117), AddScheduledJob<TJob>(), which now lives in DependencyInjection.Jobs.cs:72, ResolveCronExpression and SyncRegistrationsAsync (ScheduledJobRunner.cs:170, :267), and the design-time scheduler settings (DesignTimeDbContextHelper.cs:160-161).

Revision (2026-10-06)

  • The smart wait no longer claims to stop a one-nightly-job host from waking 2,880 times a day. The polling interval caps the wait (ScheduledJobRunner.cs:146-160), so it shortens a sleep but never removes a wake.
  • The cron trade-off no longer says parsing happens at startup or that it stops a bad expression. Parsing runs per cycle in SyncRegistrationsAsync (ScheduledJobRunner.cs:295), and an unparsable expression parks the row with outcome Skipped.
  • The settings list now names DataSource (SchedulerSettings.cs:52). The FilterClaimable description now also names the eligible-id and unprocessed conditions (OutboxProcessor.cs:453-455), and the keyed FilterUnblocked claim path (:393-395).
  • Anchors re-verified against current source. The anchors in the 2026-10-01 entry above are now stale. The LastError 2048-character cap is at ApplicationDbContext.cs:824, and the other moved anchors are corrected in the body.

Revision (2026-10-07)

Re-verified against current source. No decision, rationale or trade-off changed; the claim lease, the soft-delete exclusion and the ConfigureScheduler mapping behave as described. The consumer-adoption statement moved; the outbox anchors in the body moved with the v1.233.0 release and the context anchors with v1.232.1.

  1. The dogfooding paragraph no longer says each consumer added one migration on its Default source. ADC calls AddScheduledJobs in three of its four service hosts, not Notification (MMCA.ADC/Source/Services/MMCA.ADC.Identity.Service/Program.cs:245, MMCA.ADC.Conference.Service/Program.cs:350, MMCA.ADC.Engagement.Service/Program.cs:197), Store in three (MMCA.Store/Source/Services/MMCA.Store.Catalog.Service/Program.cs:234, MMCA.Store.Sales.Service/Program.cs:209, MMCA.Store.Identity.Service/Program.cs:196), and Helpdesk in its one service host (MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/Program.cs:89). The table is created by migrations combined with the audit trail: ADC 20260814114610, 20260814114613 and 20260814114616_AddAuditTrailAndScheduler, Store 20260814114204, 20260814114208 and 20260814114212_AddAuditTrail, Helpdesk 20260814112727_CommonV1150AuditTrailSchedulerAndTenancy.
  2. Anchors re-verified against current source: the outbox claim ExecuteUpdateAsync (OutboxProcessor.cs:357-361) inside ClaimEligibleAsync (:330), FilterClaimable (:409-415), the keyed FilterUnblocked branch (:353-355) composing it (:429), the partial-claim re-read by LockToken (:369-374), the soft-delete filter (ApplicationDbContext.cs:457, :466), ConfigureScheduler (:803-839), and the LastError 2048-character cap (:825). The 2026-10-01 and 2026-10-06 entries above are left as written: their OutboxProcessor.cs anchors and the ApplicationDbContext.cs :824 and :805-841 anchors are stale, while their ScheduledJobRunner.cs, SchedulerSettings.cs and ApplicationDbContext.cs:457/:466 anchors are current.

Revision (2026-10-21)

Re-verified against current source. No decision, rationale, trade-off or adoption statement changed; the claim lease, the partial-claim re-read, the soft-delete exclusion and the ConfigureScheduler mapping behave as described, and the consumer-adoption host set is unchanged. Only anchors in the body moved.

  1. Anchors re-verified against current source: the outbox claim ExecuteUpdateAsync (OutboxProcessor.cs:370-374, setting LockedUntil and LockToken at :372) inside ClaimEligibleAsync (:343), FilterClaimable (:422-428), the keyed FilterUnblocked branch (:366-368) composing it (:442), the partial-claim re-read by LockToken (:382-390), and ConfigureScheduler (ApplicationDbContext.cs:809-845, LastError 2048-character cap at :831). The soft-delete filter anchors (ApplicationDbContext.cs:457, :466) are current. The earlier revision entries above are left as written.

Revision (2026-10-26)

Re-verified against current source. No decision, rationale, trade-off or adoption statement changed; the claim lease, the keyed claim path, the partial-claim re-read and the consumer-adoption host set (ADC three of four hosts without Notification, Store three, Helpdesk one) behave and stand as described. Only anchors moved, two to three lines in OutboxProcessor.cs and in the consumer Program.cs files.

  1. Anchors re-verified against current source: the outbox claim ExecuteUpdateAsync (OutboxProcessor.cs:372-376, setting LockedUntil and LockToken at :374) inside ClaimEligibleAsync (:345), FilterClaimable (:424-430), the keyed FilterUnblocked branch (:368-370), FilterUnblocked itself (:439) composing FilterClaimable (:444), and the partial-claim re-read by LockToken (:384-389). The AddScheduledJobs calls are at MMCA.ADC/Source/Services/MMCA.ADC.Identity.Service/Program.cs:252, MMCA.ADC.Conference.Service/Program.cs:358, MMCA.ADC.Engagement.Service/Program.cs:204, MMCA.Store/Source/Services/MMCA.Store.Catalog.Service/Program.cs:240, MMCA.Store.Sales.Service/Program.cs:216, MMCA.Store.Identity.Service/Program.cs:210 and MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/Program.cs:89. The 2026-10-07 and 2026-10-21 entries above are left as written; their OutboxProcessor.cs anchors and the 2026-10-07 ADC and Store Program.cs anchors are stale.

Revision (2026-10-28)

Re-verified against current source. No decision, rationale, trade-off or adoption statement changed; the consumer-adoption host set (ADC three of four hosts without Notification, Store three, Helpdesk one) stands as described. Only the ADC Identity AddScheduledJobs anchor moved, by one line.

  1. Anchors re-verified against current source: the AddScheduledJobs calls are at MMCA.ADC/Source/Services/MMCA.ADC.Identity.Service/Program.cs:253, MMCA.ADC.Conference.Service/Program.cs:358, MMCA.ADC.Engagement.Service/Program.cs:204, MMCA.Store/Source/Services/MMCA.Store.Catalog.Service/Program.cs:240, MMCA.Store.Sales.Service/Program.cs:216, MMCA.Store.Identity.Service/Program.cs:210 and MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/Program.cs:89; MMCA.ADC.Notification.Service/Program.cs still has no call. The 2026-10-26 entry above is left as written; its ADC Identity anchor (:252) is stale and its other Program.cs anchors are current.

Revision (2026-11-07)

A correction, not a behavior change. No decision, rationale or default changed.

  1. A cron override applies on restart, not on the next cycle of a running host. The Decision said an override edited on a running host takes effect on the next cycle. It does not: ScheduledJobRunner copies IOptions<SchedulerSettings>.Value into a field once, at construction (MMCA.Common/Source/Core/MMCA.Common.Infrastructure/Scheduling/ScheduledJobRunner.cs:46), and SyncRegistrationsAsync resolves each job's cron from that copy (:286), so a changed Scheduler:Jobs:{Name}:Cron is never seen until the host restarts. The first cycle after the restart rewrites the stored expression and recomputes the next occurrence (:295, :301-305). The override's own documentation now says so (SchedulerSettings.cs:68-75). The Decision paragraph is corrected.
  2. A cron with no next occurrence parks the job. 0 0 31 2 * parses, so it raises no parse error, but Cronos finds no 31 February and returns no occurrence (ScheduledJobRunner.cs:176-178, :195). The sync stores DateTime.MaxValue as NextRunOn (:313 for a new row, :342 for a changed one), and a completed run does the same when its expression has no further occurrence (:488). Unlike an unparsable expression, nothing is logged and LastOutcome is not set to Skipped, so the only sign is a NextRunOn of DateTime.MaxValue. The cron trade-off now records it.

Revision (2026-11-23)

Re-verified against current source. No decision, rationale, trade-off, default or adoption statement changed; the claim lease, the keyed claim path, the partial-claim re-read, the soft-delete exclusion, the restart-only override, the parking of an unparsable or occurrence-less cron, the defaults (30, 300, SQLServer) and the consumer-adoption host set (ADC three of four hosts without Notification, Store three, Helpdesk one) behave and stand as described. Only anchors in the body moved.

  1. Anchors re-verified against current source: the outbox claim ExecuteUpdateAsync (OutboxProcessor.cs:375-379, setting LockedUntil and LockToken at :377) inside ClaimEligibleAsync (:348), FilterClaimable (:427-433), the keyed FilterUnblocked branch (:371-373), FilterUnblocked itself (:442) composing FilterClaimable (:447), and the partial-claim re-read by LockToken (:388-392); the soft-delete filter (ApplicationDbContext.cs:605, :614), ConfigureScheduler (:958-994, called at :568) and the LastError 2048-character cap (:980); ComputeWaitTime (ScheduledJobRunner.cs:149-163), the settings copy taken at construction (:47), the startup delay (:70), ResolveCronExpression (:173), TryGetNextOccurrence (:187, Cronos at :198), SyncRegistrationsAsync (:270) with its per-job resolve (:289), unchanged-row skip (:290-295), parse (:298), new-row park (:316, Skipped at :317) and changed-row update (:345-368), and the completion path's park (:521); SchedulerSettings Enabled, PollingIntervalSeconds, LeaseSeconds, DataSource and Jobs (SchedulerSettings.cs:26, :34, :46, :55, :63) and the override Cron with its restart note (:71-78); AddPermissions (AuthorizationExtensions.cs:115) and EnsurePermissionRegistry (:192, called at :119); the design-time scheduler settings (DesignTimeDbContextHelper.cs:161-162). The AddScheduledJobs calls are at MMCA.ADC/Source/Services/MMCA.ADC.Identity.Service/Program.cs:219, MMCA.ADC.Conference.Service/Program.cs:290, MMCA.ADC.Engagement.Service/Program.cs:118, MMCA.Store/Source/Services/MMCA.Store.Catalog.Service/Program.cs:94, MMCA.Store.Identity.Service/Program.cs:102, MMCA.Store.Sales.Service/Program.cs:106 and MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/Program.cs:105; MMCA.ADC.Notification.Service still has no call. The earlier revision entries above are left as written; their anchors are stale.

ADR-003 (the outbox whose claim-lease idiom and smart wait this reuses verbatim, and whose at-least-once posture it inherits along with the idempotency obligation on job bodies), ADR-052 (in-process background execution: the request-triggered, non-durable sibling this does not replace, the boundary being durability and ownership, since work started by a request and safe to lose stays on the bounded queue while work owned by a clock and required to survive a restart belongs here), ADR-006 (database-per-service, why the outbox is per-source and this job store is Default-source-only), ADR-075 (the audit-trail retention purge that ships as this scheduler's first job), ADR-070 (the validating chain SchedulerSettings binds through), ADR-041 (the metrics conventions SchedulerMetrics follows, the same ones OutboxMetrics follows, with its own instrument set), ADR-030 (the startup owner that applies the migration creating the job table).