NexJob 1.0.0

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

<div align="center">

<br/>

███╗   ██╗███████╗██╗  ██╗     ██╗ ██████╗ ██████╗
████╗  ██║██╔════╝╚██╗██╔╝     ██║██╔═══██╗██╔══██╗
██╔██╗ ██║█████╗   ╚███╔╝      ██║██║   ██║██████╔╝
██║╚██╗██║██╔══╝   ██╔██╗ ██   ██║██║   ██║██╔══██╗
██║ ╚████║███████╗██╔╝ ██╗╚█████╔╝╚██████╔╝██████╔╝
╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝ ╚════╝  ╚═════╝ ╚═════╝

Background jobs for .NET. Predictable. Observable. No magic.

NuGet NuGet Downloads Build License: MIT

<br/>

</div>


What is NexJob?

NexJob is a reliable background job processing library for .NET 8. It gives you predictable execution, built-in retries, deadline enforcement, and operational visibility — without the complexity of traditional schedulers.

If you need jobs that must run, fail safely, and leave a trace, NexJob handles it as a first-class concern.


Why not Hangfire?

NexJob was built for developers who want Hangfire-like reliability without the paid storage providers or the hidden complexity.

Feature NexJob Hangfire
Storage providers 5 free (PostgreSQL, SQL Server, Redis, MongoDB, InMemory) Free InMemory only; others require paid license
Deadline enforcement Built-in (deadlineAfter) Plugin required
Dead-letter handling Automatic after exhausted retries Manual
Dispatch latency Near-zero (wake-up channel) Polling-based
Dashboard Built-in, standalone UI Built-in (Pro required for advanced)
OpenTelemetry Built-in traces and metrics Plugin required
Concurrency throttling [Throttle] attribute per resource Queue-level limits
Ecosystem Young library, focused scope Mature ecosystem, many plugins
Package size ~50 KB ~2 MB

NexJob is not a drop-in replacement for Hangfire. If you need calendar-based scheduling, distributed execution across untrusted networks, or enterprise plugin ecosystems, Hangfire is the better choice.


Quick Start

dotnet add package NexJob
// 1. Register NexJob and scan for jobs
builder.Services.AddNexJob();
builder.Services.AddNexJobJobs(typeof(Program).Assembly);
// 2. Define a job
public sealed class SendInvoiceJob : IJob<SendInvoiceInput>
{
    private readonly IEmailService _email;

    public SendInvoiceJob(IEmailService email) => _email = email;

    public async Task ExecuteAsync(SendInvoiceInput input, CancellationToken ct)
        => await _email.SendAsync(input.Email, "Your invoice", ct);
}

public sealed record SendInvoiceInput(string Email);
// 3. Enqueue from anywhere
var scheduler = app.Services.GetRequiredService<IScheduler>();
await scheduler.EnqueueAsync<SendInvoiceJob, SendInvoiceInput>(
    new SendInvoiceInput("customer@example.com"),
    deadlineAfter: TimeSpan.FromMinutes(5));

The job expires if not started within 5 minutes — no silent failures, no zombie jobs.


Core Features

  • IJob / IJob<T> — simple and structured job interfaces
  • Predictable retries — exponential backoff with configurable policies, global + per-job [Retry]
  • Deadline enforcement — jobs expire if not executed in time (deadlineAfter)
  • Dead-letter handlers — automatic fallback when all retries are exhausted
  • Concurrency throttling[Throttle] attribute for per-resource limits
  • Job continuations — chain jobs with parent/child relationships
  • IdempotencyDuplicatePolicy controls re-enqueue behavior
  • Recurring jobs — via code or appsettings.json
  • Job filtersIJobExecutionFilter middleware for cross-cutting behaviour
  • Job retention — automatic cleanup of terminal jobs with configurable TTL
  • OpenTelemetry — traces and metrics built-in
  • Built-in dashboard — standalone dark UI, zero configuration

Storage Providers

Provider Package Status
InMemory NexJob (core) Production ready
PostgreSQL NexJob.Postgres Production ready
SQL Server NexJob.SqlServer Production ready
Redis NexJob.Redis Production ready
MongoDB NexJob.MongoDB Production ready

All providers implement IRuntimeSettingsStore — runtime configuration persists across restarts.


Dashboard

The dashboard provides a visual timeline of every job's lifecycle — no log reconstruction needed. See failures, retries, expired jobs, and execution timing at a glance.

app.UseNexJobDashboard("/dashboard");

One line. No configuration required.


Documentation

Complete documentation is in the wiki. Key pages:


Benchmarks

Measured per individual enqueue operation:

Metric NexJob Hangfire
Latency 9.3 µs 26.6 µs
Memory 1.67 KB 11.2 KB

NexJob is 2.87× faster and uses 85% less memory per enqueue. Benchmarks run with BenchmarkDotNet against comparable configurations.


Roadmap

v0.4.0  ✅ Deadlines, dead-letter handlers, wake-up signaling
v0.5.0  ✅ Wake-up channel, recurring jobs, dashboard timeline
v0.6.0  ✅ Distributed reliability tests, recurring config redesign
v0.7.0  ✅ DuplicatePolicy, atomic commits, AI execution system
v0.8.0  ✅ Filters, persistent settings, job retention, wiki
v1.0.0  ○ API freeze, production hardened
v2.0.0  ○ Distributed coordination, multi-node consistency

<div align="center"> <br/>

Built with obsession over developer experience and production reliability.

<br/>

License: MIT    © 2025 Luciano Azevedo

</div>

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on NexJob:

Package Downloads
NexJob.Dashboard

Blazor SSR dashboard middleware for NexJob — real-time monitoring of background jobs.

NexJob.Postgres

PostgreSQL storage provider for NexJob — the open-source background job scheduler for .NET 8+.

NexJob.MongoDB

MongoDB storage provider for NexJob — the open-source background job scheduler for .NET 8+.

NexJob.SqlServer

SQL Server storage provider for NexJob.

NexJob.Redis

Redis storage provider for NexJob.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 83 4/8/2026
0.8.0 78 4/8/2026
0.7.0 123 4/7/2026
0.6.0 162 4/3/2026
0.5.2 168 4/1/2026
0.5.1 158 4/1/2026
0.5.0 168 3/31/2026
0.4.0 163 3/31/2026
0.3.2 206 3/28/2026
0.3.1 219 3/28/2026
0.3.0 181 3/27/2026
0.2.0 178 3/27/2026
0.1.1 131 3/27/2026
0.1.0 122 3/26/2026
0.1.0-alpha 123 3/26/2026