Kododo.RunWay 1.0.0-alpha.2

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

Kododo.RunWay

Lightweight background job queue for .NET. Schedule and persist jobs with priority, retries, timeout support, and outbox pattern integration.

Install

dotnet add package Kododo.RunWay
dotnet add package Kododo.RunWay.Runner        # background worker
dotnet add package Kododo.RunWay.PostgreSQL    # storage provider
dotnet add package Kododo.RunWay.Dashboard     # optional — web UI

Setup

builder.Services.AddRunWay(x =>
{
    x.UsePostgreSQL(p => p.GetRequiredService<AppDbContext>().Database.GetDbConnection())
     .AddRunner(opts => opts.AddHandlersFromAssembly(typeof(Program).Assembly))
     .AddDashboard();
});

Define a job

public class SendEmailJob
{
    public required string To      { get; set; }
    public required string Subject { get; set; }
}

public class SendEmailJobHandler : IJobHandler<SendEmailJob>
{
    public async Task HandleAsync(SendEmailJob data, CancellationToken stoppingToken)
    {
        // send email...
    }
}

Schedule a job

public class OrderService(IScheduler scheduler)
{
    public async Task PlaceOrderAsync(Order order, CancellationToken ct)
    {
        await scheduler
            .Job(new SendEmailJob { To = order.Email, Subject = "Order confirmed" })
            .ScheduleAsync(ct);
    }
}

Scheduling options

await scheduler
    .Job(new SendEmailJob { To = "user@example.com", Subject = "Hello" })
    .WithPriority(10)                          // higher = processed first (default: 0)
    .WithRetryDelaysInSeconds(10, 60, 300)     // retry after 10s, 60s, 5min
    .WithTimeout(TimeSpan.FromMinutes(5))      // fail job if it exceeds this duration
    .ScheduleAsync(ct);

// Schedule for a future time
await scheduler
    .Job(new ReminderJob { Message = "Don't forget!" })
    .ScheduleAsync(DateTimeOffset.UtcNow.AddHours(2), ct);

Recurring jobs

Register recurring jobs on startup using a standard 5-field cron expression. The expression is validated at startup and stored as-is — shorthand like */5 * * * * is preserved.

// Before app.Run()
await app.SetRecurrenceAsync("hourly-report", "0 * * * *", new GenerateReportJob());

// With options
await app.SetRecurrenceAsync("cleanup", "0 2 * * *", new CleanupJob(), opts =>
    opts.WithTimeout(TimeSpan.FromMinutes(30)));

Safe to call on every startup — only updates when the expression or data changes.

Outbox pattern

Enlist job creation in an existing database transaction for guaranteed atomicity:

await using var transaction = await db.Database.BeginTransactionAsync();

db.Orders.Add(new Order { ... });
await db.SaveChangesAsync();

// AsTransactional(false) — reuse the ambient transaction instead of opening a new one
await scheduler
    .Job(new SendEmailJob { To = "user@example.com", Subject = "Order confirmed" })
    .AsTransactional(false)
    .ScheduleAsync(ct);

// Both the order and the job are committed or rolled back together
await transaction.CommitAsync();

For this to work, RunWay must share the same database connection as your DbContext:

x.UsePostgreSQL(p => p.GetRequiredService<AppDbContext>().Database.GetDbConnection())
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (3)

Showing the top 3 NuGet packages that depend on Kododo.RunWay:

Package Downloads
Kododo.RunWay.Runner

Background job runner for RunWay. Polls the job queue and executes handlers with configurable concurrency, retries, and heartbeat.

Kododo.RunWay.PostgreSQL

PostgreSQL storage provider for RunWay. Persists jobs and runner state using Entity Framework Core with automatic migrations.

Kododo.RunWay.Dashboard

Embedded web dashboard for RunWay. Inspect job statuses, audit timelines, and runner health directly from your ASP.NET Core application.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.2 56 5/21/2026
1.0.0-alpha.1 55 5/21/2026