UKBatch 0.1.5-alpha
Pre-release
Pre-release
Fixed
- Scheduled jobs no longer fire twice. Two distinct duplicate-fire bugs were found and fixed:
- Clock skew: the scheduler's timer could complete marginally before the wall-clock deadline (timer rounding, NTP slew), firing an occurrence early and then re-arming that same occurrence. The loop now re-checks the deadline after every wake and anchors the next occurrence no earlier than the one just fired.
- Duplicate registration: a job registered explicitly through the builder under a custom name was registered a second time by attribute discovery under its attribute-derived name, arming its
[Job(Schedule = ...)]cron twice. Discovery now skips any implementation type that is already registered — the explicit registration wins.
- A scheduler fire that fails to enqueue no longer strands a
Pendingexecution row — the created row is compensated toFailedwith a descriptive error. - Lifecycle hardening for the scheduler and the runtime host: shutdown waits are bounded by
ShutdownTimeoutand honor the host's grace token;StartAsyncis one-shot (a duplicate start is a logged no-op instead of doubling workers and leaking the stopping source); the linked stopping sources are disposed, safely even when the service provider is torn down beforeStopAsyncruns; an abort during startup now reaches the worker loops. - A flaky transport test raced CI load — the short-timeout request-reply test budget was widened; no production change.
Changed
- Cron documentation corrected. The documented schedule examples were five-field crontab expressions, which the six-field seconds-first default format rejects at startup. Examples are now six-field, the format is stated explicitly (with the
CronFormat.Standardopt-in for five-field expressions), and theJobAttribute.ScheduleAPI documentation describes the actual contract. - The API samples run with a plain
dotnet run— launch profiles pin the port and theDevelopmentenvironment (the development-only auth scheme refusesProductionby design), and the readmes document the-fflag the multi-targeted samples require. - The package readmes and the root README link the documentation website (https://nspukcode-hub.github.io/UKBatch/).