HostLoom.Scheduling.Leadership 0.18.0

dotnet add package HostLoom.Scheduling.Leadership --version 0.18.0
                    
NuGet\Install-Package HostLoom.Scheduling.Leadership -Version 0.18.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HostLoom.Scheduling.Leadership" Version="0.18.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HostLoom.Scheduling.Leadership" Version="0.18.0" />
                    
Directory.Packages.props
<PackageReference Include="HostLoom.Scheduling.Leadership" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HostLoom.Scheduling.Leadership --version 0.18.0
                    
#r "nuget: HostLoom.Scheduling.Leadership, 0.18.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HostLoom.Scheduling.Leadership@0.18.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HostLoom.Scheduling.Leadership&version=0.18.0
                    
Install as a Cake Addin
#tool nuget:?package=HostLoom.Scheduling.Leadership&version=0.18.0
                    
Install as a Cake Tool

HostLoom.Scheduling.Leadership

This package runs exclusive HostLoom schedules on the elected leader only:

services
    .AddHostLoomLeadership()
    .AddRole("scheduler");

services
    .AddHostLoomScheduling()
    .UseLeader("scheduler")
    .AddSchedule<RebuildCatalogJob>(
        "catalog:rebuild",
        ScheduleTrigger.Cron("0 0 2 * * *"),
        options => options.Exclusive = true);

LeaderScheduleGuard is an IScheduleGuard over ILeadership. A claim is granted while this instance leads the role and refused otherwise, so no lock round trip happens per occurrence and the winner is sticky until the leader changes; followers record every occurrence as Skipped. The claim's lost token is the leadership token: a run in progress ends as ClaimLost when leadership ends, and a job that ignores its token can overlap the next leader's run.

Compared with HostLoom.Scheduling.Locking, which claims each occurrence through the lock and spreads work across instances, this guard keeps every exclusive schedule on one instance and inherits the leadership guarantee: at most one leader while clocks and the lock backend behave, no fencing. Choose one guard per service collection; UseGuard refuses a second.

Over a disabled lock (Locking:Enabled = false) the guard reports IsCoordinated = false and follows the role's Leadership:WhenUncoordinated: Follow, the default, skips every occurrence on every instance; Lead runs every occurrence on every instance. The scheduler warns once and its probe reports the guard as uncoordinated.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.18.0 0 10/27/2026
0.17.0 57 10/25/2026
0.16.1 52 10/22/2026
0.16.0 83 10/14/2026
0.15.1 82 10/12/2026
0.15.0 100 10/4/2026
0.14.0 100 10/4/2026
0.13.0 108 9/28/2026
0.12.0 95 9/27/2026
0.11.0 95 9/25/2026
0.10.0 105 9/22/2026
0.9.0 101 9/22/2026