web/website/docs/central-scheduler.md

31 lines
2.4 KiB
Markdown

# Central Scheduler
The central scheduler replaces the bank ticker name and runs registered tasks
under durable database leases. Current tasks are four-hour Brussels bank/credit
settlement, private credit-review ticket synchronisation, statement indexing and
statement generation. Future payroll and tax jobs join this registry.
Operations Dashboard exposes **Run Central Scheduler** only to pinned Big Four
control identities (including the verified owner alias and exempt Dev operator).
It runs due slots only. The endpoint accepts no clock, cutoff or force override.
Manual runs are audited under the actual actor. Already completed or currently
leased slots are skipped; failures retain a retry state. Domain financial jobs
retain their own account locks, idempotency keys, audit and posting transactions.
Non-grant credit applications create a durable Support job in the application
transaction. The existing osTicket intake API creates a private Sales review
ticket bound to the applicant and application ID. Bank decisions remain in Credit
Management. Grants create no manual review ticket. Support failures do not undo
an application or move money. A completed/withdrawn review closes its ticket; an
unreviewed application reopens a prematurely closed review ticket.
Install the custom CLI adapter with install-bank-credit-support.py --apply after
CI-approved publication. link-pending-credit-support.mjs plans by default; an
explicit --apply --actor=UUID links existing submitted non-grant applications.
Native idempotency mapping and an advisory lock prevent duplicate tickets after
retries. An interrupted creation with an ambiguous native result stops for review
rather than creating another ticket. No native core code is replaced.
## Manual recheck of all bank tickers
The owner-authorized Run Due Scheduled Tasks action rechecks every registered bank ticker, including the bank settlement ticker's loan engine. It also invokes credit support, standing instructions, monthly payroll, tariff publication and statement workers. A completed scheduler slot does not suppress a manual recheck, but an active lease still does. The original cutoff is passed to each worker; payment dates, four-hour settlements, maturity dates and domain idempotency remain authoritative. Intent is audited before workers start, and authority is checked again between tickers. Additional wage cycles are never triggered by this scheduler action.