Koto.Scheduling 0.4.0

dotnet add package Koto.Scheduling --version 0.4.0
                    
NuGet\Install-Package Koto.Scheduling -Version 0.4.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="Koto.Scheduling" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Koto.Scheduling" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Koto.Scheduling" />
                    
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 Koto.Scheduling --version 0.4.0
                    
#r "nuget: Koto.Scheduling, 0.4.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 Koto.Scheduling@0.4.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=Koto.Scheduling&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Koto.Scheduling&version=0.4.0
                    
Install as a Cake Tool

Koto.Scheduling

Quartz.NET-based scheduled jobs and batch processing for Koto microservices.

What's included

Type Purpose
IScheduledJob Marker interface: JobId + ExecuteAsync
ScheduledJobBase Quartz IJob wrapper with structured logging and error handling
BatchJobBase<TItem> Cursor-based batch processor: fetch → process page by page
AddKotoScheduling(builder => ...) One-liner DI registration

Setup

// Program.cs
builder.Services.AddKotoScheduling(scheduling =>
{
    scheduling.AddJob<SendDailyDigestJob>("0 0 8 * * ?");  // 08:00 every day
    scheduling.AddJob<CleanupExpiredTokensJob>("0 */15 * * * ?"); // every 15 min

    // For HPA / multi-pod: enable PostgreSQL clustered job store
    scheduling.UseJobStore(builder.Configuration.GetConnectionString("QuartzDb")!);
});

Implementing a scheduled job

public class SendDailyDigestJob : ScheduledJobBase
{
    private readonly IUserRepository _users;
    private readonly IEmailService _email;

    public override string JobId => "orders.send-daily-digest";

    public SendDailyDigestJob(
        IUserRepository users,
        IEmailService email,
        ILogger<ScheduledJobBase> logger) : base(logger)
    {
        _users = users;
        _email = email;
    }

    public override async Task ExecuteAsync(CancellationToken ct)
    {
        var users = await _users.GetUsersWithPendingDigestAsync(ct);
        foreach (var user in users)
            await _email.SendDigestAsync(user, ct);
    }
}

Implementing a batch job

public class SyncProductsJob : BatchJobBase<ProductDto>
{
    public override string JobId => "catalog.sync-products";

    protected override int BatchSize => 50;

    public SyncProductsJob(ILogger<BatchJobBase<ProductDto>> logger) : base(logger) { }

    protected override Task<IReadOnlyList<ProductDto>> FetchBatchAsync(
        int offset, int batchSize, CancellationToken ct)
        => _api.GetProductsAsync(offset, batchSize, ct);

    protected override Task ProcessItemAsync(ProductDto item, CancellationToken ct)
        => _repo.UpsertAsync(item, ct);
}

Distributed locking (HPA / multi-pod)

Call .UseJobStore(connectionString) to switch Quartz to PostgreSQL-backed clustered mode. Only one pod executes each trigger at a time — no additional distributed lock needed. Requires the Quartz PostgreSQL schema to be applied to the database.

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.4.0 88 7/21/2026
0.3.0-preview.15 45 7/21/2026
0.3.0-preview.14 45 7/21/2026
0.3.0-preview.13 45 7/21/2026
0.3.0-preview.12 41 7/21/2026
0.3.0-preview.11 47 7/21/2026
0.3.0-preview.10 39 7/21/2026
0.3.0-preview.9 39 7/21/2026
0.3.0-preview.8 58 7/21/2026
0.3.0-preview.7 41 7/21/2026
0.3.0-preview.6 44 7/20/2026
0.3.0-preview.5 50 7/19/2026
0.3.0-preview.4 45 7/19/2026
0.3.0-preview.3 47 7/11/2026
0.3.0-preview.2 47 7/11/2026
0.3.0-preview.1 52 7/3/2026
0.2.0-preview.1 55 6/28/2026
0.1.0-preview.5 64 5/13/2026