NexJob 1.0.0
dotnet add package NexJob --version 1.0.0
NuGet\Install-Package NexJob -Version 1.0.0
<PackageReference Include="NexJob" Version="1.0.0" />
<PackageVersion Include="NexJob" Version="1.0.0" />
<PackageReference Include="NexJob" />
paket add NexJob --version 1.0.0
#r "nuget: NexJob, 1.0.0"
#:package NexJob@1.0.0
#addin nuget:?package=NexJob&version=1.0.0
#tool nuget:?package=NexJob&version=1.0.0
<div align="center">
<br/>
███╗ ██╗███████╗██╗ ██╗ ██╗ ██████╗ ██████╗
████╗ ██║██╔════╝╚██╗██╔╝ ██║██╔═══██╗██╔══██╗
██╔██╗ ██║█████╗ ╚███╔╝ ██║██║ ██║██████╔╝
██║╚██╗██║██╔══╝ ██╔██╗ ██ ██║██║ ██║██╔══██╗
██║ ╚████║███████╗██╔╝ ██╗╚█████╔╝╚██████╔╝██████╔╝
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚════╝ ╚═════╝ ╚═════╝
Background jobs for .NET. Predictable. Observable. No magic.
<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
- Idempotency —
DuplicatePolicycontrols re-enqueue behavior - Recurring jobs — via code or
appsettings.json - Job filters —
IJobExecutionFiltermiddleware 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:
- Mental Model — how NexJob works, read this first
- Getting Started — run your first job in 2 minutes
- Best Practices — production guidelines
- Troubleshooting — debug common issues
- Common Scenarios — real-world use cases with code
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/>
© 2025 Luciano Azevedo
</div>
| Product | Versions 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. |
-
net8.0
- Cronos (>= 0.8.4)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Text.Encodings.Web (>= 8.0.0)
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 |