Distributed task schedulers must reconcile dynamic job admission, lease-based ownership, and failure recovery while preserving deterministic ordering guarantees. We present a height-balanced binary search tree (BST) as the core indexing structure for a C# scheduler that tracks job metadata, retry counts, and lease expirations. The tree guarantees O(log N) point and range queries, O(log N) insertions, and O(log N) rebalancing, as proven by formal structural analysis (AST) inspection and formal invariant proofs. The scheduler's state machine enforces strict height-balance and key-order invariants, ensuring that concurrent lease renewals and failure notifications do not violate ordering semantics. No empirical runtime measurements are reported; all claims are supported by static analysis and formal reasoning.
Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.
Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_11_08_distributed_task_scheduler_system_d,
title={Height-Balanced Invariant Enforcement in a C# Distributed Task Scheduler: Jobs, Retries, Leases, and Failures},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Agentic Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-11-08_distributed_task_scheduler_system_d/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-11-08_distributed_task_scheduler_system_d/2026-11-08_distributed_task_scheduler_system_d.pdf}}
}