Distributed job orchestration engine for .NET. Built for horizontal scale, designed for resilience.
Standalone is the simplest way to run JobMaster. A single database connection handles coordination, job storage, and the transport layer — no additional brokers required.
builder.Services.AddJobMasterCluster(config =>
{
config.UseStandaloneCluster()
.ClusterId("Local-Cluster-01")
.UsePostgres("Host=localhost;Database=jobmaster_db;Username=postgres;Password=pwd")
.AddWorker();
});
var app = builder.Build();
await app.Services.StartJobMasterRuntimeAsync();public sealed class HelloJobHandler : IJobHandler
{
public async Task HandleAsync(JobContext job)
{
var name = job.MsgData.TryGetStringValue("Name") ?? "World";
Console.WriteLine($"Hello {name}");
await Task.CompletedTask;
}
}Handlers are resolved from the .NET DI container — inject your services (repositories, HTTP clients, etc.) directly into the constructor.
IJobMasterScheduler is registered automatically. Inject it anywhere in your application.
app.MapPost("/schedule-job", async (IJobMasterScheduler jobScheduler) =>
{
var msg = WriteableMessageData.New().SetStringValue("Name", "John Doe");
await jobScheduler.OnceNowAsync<HelloJobHandler>(msg);
return Results.Accepted();
}).WithOpenApi();JobMaster separates responsibilities into three layers:
- Cluster Database (Master) — source of truth. Stores jobs, coordinates agents, and persists configuration.
- Agents (Transport Layer) — ephemeral, high-speed buffers for in-flight jobs. Supports PostgreSQL, MySQL, SQL Server, and NATS JetStream.
- Workers (Execution Layer) — claim and execute jobs using atomic locks. Scale horizontally with zero downtime.
JobMaster supports recurrence expressions using the NaturalCron library.
// Fluent builder
var expression = NaturalCronBuilder.Every(1).Minutes().Build();
await jobScheduler.RecurringAsync<HelloJobHandler>(expression);
// Expression string
await jobScheduler.RecurringAsync<HelloJobHandler>(NaturalCronExprCompiler.TypeId, "every 1 minutes");JobMaster ships a browser-based dashboard and a REST API for monitoring clusters, jobs, workers, buckets, and agent connections in real time.
dotnet add package JobMaster.Api
dotnet add package JobMaster.DashboardBoth can run in a completely separate process from your workers — all they need is access to the master database.
Full documentation is available at docs.jobmaster.hugoj0s3.dev:
- Getting Started
- [Scheduling] (https://docs.jobmaster.hugoj0s3.dev/docs/scheduling/one-off-scheduling)
- Architecture Overview