JobMaster 0.0.5-alpha

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

Experimental Alpha Release

This package is in an early stage and subject to significant changes before 1.0. Features and APIs may evolve, and stability is not guaranteed. Not recommended for production environments.

JobMaster .Net

Distributed job orchestration engine for .NET. Built for horizontal scale.

JobMaster is a high-performance framework designed to manage and execute background tasks across a distributed cluster. By decoupling coordination from execution, it allows developers to scale compute resources horizontally based on real-time workload demands without compromising system stability.

📦 Installation & NuGet

dotnet add package JobMaster

🏗 Core Architecture

To achieve true resilience and massive scale, JobMaster utilizes a three-layer architecture:

  1. The Master (Coordination): The "Source of Truth." It manages cluster topology, job definitions, and long-term auditing. It ensures that the state of your entire ecosystem is persistent and consistent.
  2. Agents (Transport): High-speed ephemeral storage or message brokers (PostgreSQL, SQL Server, or NATS JetStream). Agents act as high-performance buffers for "in-flight" jobs, ensuring workers can claim tasks with ultra-low latency.
  3. Workers (Execution): The compute power. Workers monitor specific Agents, claim available jobs using atomic locks, and synchronize execution results back to the Master Database.

🚀 Getting Started

1. Configuration

Register JobMaster in your Program.cs. This defines your cluster identity and sets up your storage providers.

builder.Services.AddJobMasterCluster(config =>
{
    // Define the central coordination database
    config.ClusterId("Production-Cluster")
          .UsePostgresForMaster(connectionString);

    // Define the transport layer (Agent)
    config.AddAgentConnectionConfig("Transport-1")
          .UsePostgresForAgent(agentConnectionString);
    
    // Attach a worker to the transport
    config.AddWorker()
          .AgentConnName("Transport-1");
});

// Start the runtime
await app.Services.StartJobMasterRuntimeAsync();

Implement a Job Handler

Define your logic by implementing IJobHandler

public class NotificationHandler : IJobHandler
{
    public async Task HandleAsync(JobContext job)
    {
        var userId = job.MsgData.GetStringValue("UserId");
        // Business logic here...
        await Task.CompletedTask;
    }
}

Schedule Jobs

Inject IJobMasterScheduler into your services or Minimal APIs.

Immediate or Delayed Execution

app.MapPost("/send-welcome", async (IJobMasterScheduler scheduler) =>
{
    var msg = WriteableMessageData.New().SetStringValue("UserId", "user_123");
    
    // Enqueue for immediate processing
    await scheduler.OnceNowAsync<NotificationHandler>(msg);
    
    return Results.Accepted();
});

Recurring Schedules (Static & Dynamic)

JobMaster supports both code-defined (Static) and runtime-defined (Dynamic) recurring tasks.

Simple Interval
var msg = WriteableMessageData.New().SetStringValue("UserId", "user_123");

await scheduler.RecurringAsync<NotificationHandler>(
    TimeSpan.FromHours(24), 
    msg);
NaturalCron
using NaturalCron;
using JobMaster.RecurrenceExpressions.NaturalCron;

var msg = WriteableMessageData.New().SetStringValue("UserId", "user_123");
// Via Expression
await scheduler.RecurringAsync<NotificationHandler>(
    NaturalCronExprCompiler.TypeId,
    "every day between mon and fri at 18:00",
    msg);

// Via fluent builder
NaturalCronExpr schedule = NaturalCronBuilder
.Every(30).Minutes()
.In(NaturalCronMonth.Jan)
.Between("09:00", "18:00")
.Build();

await scheduler.RecurringAsync<NotificationHandler>(
    schedule,
    msg);

See NaturalCron

🛠 Advanced Features

  • Transport Agnostic: Seamlessly switch between RDBMS (Postgres, MySQL, SQL Server) and Message Brokers (NATS JetStream) without changing your business logic.
  • Performance Buffering: New jobs are instantly persisted to the Agent for immediate execution, then asynchronously synced to the Master for long-term auditing.
  • Atomic Locking: Built-in protection to ensure that even in a multi-node cluster, a job is never executed by more than one worker simultaneously.
  • Static & Dynamic Scheduling: Support for code-defined "Static Profiles" that sync on startup and "Dynamic Schedules" created at runtime via API.
  • Horizontal Scaling: You can spin up as many worker instances as needed to handle your current workload without reconfiguring the Cluster Database.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 JobMaster:

Package Downloads
JobMaster.SqlBase

JobMaster is a framework designed to manage and execute background tasks across a distributed cluster. This package provides SQL Base integration.

JobMaster.NatsJetStream

JobMaster is a framework designed to manage and execute background tasks across a distributed cluster. This package provides NATS JetStream integration.

JobMaster.Api

JobMaster is a framework designed to manage and execute background tasks across a distributed cluster. This package provides a API for job queries and job scheduling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.5-alpha 31 2/1/2026
0.0.4-alpha 55 1/29/2026
0.0.3-alpha 45 1/23/2026
0.0.2-alpha 40 1/22/2026
0.0.1-alpha 46 1/22/2026