ZeroAlloc.Scheduling.EfCore
1.1.1
See the version list below for details.
dotnet add package ZeroAlloc.Scheduling.EfCore --version 1.1.1
NuGet\Install-Package ZeroAlloc.Scheduling.EfCore -Version 1.1.1
<PackageReference Include="ZeroAlloc.Scheduling.EfCore" Version="1.1.1" />
<PackageVersion Include="ZeroAlloc.Scheduling.EfCore" Version="1.1.1" />
<PackageReference Include="ZeroAlloc.Scheduling.EfCore" />
paket add ZeroAlloc.Scheduling.EfCore --version 1.1.1
#r "nuget: ZeroAlloc.Scheduling.EfCore, 1.1.1"
#:package ZeroAlloc.Scheduling.EfCore@1.1.1
#addin nuget:?package=ZeroAlloc.Scheduling.EfCore&version=1.1.1
#tool nuget:?package=ZeroAlloc.Scheduling.EfCore&version=1.1.1
ZeroAlloc.Scheduling
ZeroAlloc.Scheduling is a source-generated background job scheduler for .NET 8 and .NET 10. Decorate any class with [Job] and the source generator wires up the executor, DI registration, and recurring startup automatically — no reflection, no convention scanning at runtime.
Install
The source generator is bundled into the main package — a single PackageReference is all you need:
dotnet add package ZeroAlloc.Scheduling
dotnet add package ZeroAlloc.Scheduling.InMemory # or EfCore / Redis
The standalone
ZeroAlloc.Scheduling.Generatorpackage is still published for backwards compatibility with existing direct PackageReferences, but new consumers should reference onlyZeroAlloc.Scheduling.
Example
// 1. Define a job — the generator picks it up automatically
[Job(Every = Every.Hour)]
public sealed class CleanupExpiredSessionsJob : IJob
{
private readonly ISessionRepository _repo;
public CleanupExpiredSessionsJob(ISessionRepository repo) => _repo = repo;
public async ValueTask ExecuteAsync(JobContext ctx, CancellationToken ct)
=> await _repo.DeleteExpiredAsync(ct);
}
// 2. Register — generated AddCleanupExpiredSessionsJob() wires executor + recurring startup
services.AddScheduling()
.WithInMemoryStore()
.AddCleanupExpiredSessionsJob();
// 3. Enqueue a one-off job from application code
public class OrderService(IScheduler scheduler)
{
public async Task CompleteOrderAsync(Order order, CancellationToken ct)
{
await ProcessAsync(order, ct);
await scheduler.EnqueueAsync(new SendOrderConfirmationJob(order.Id), ct);
}
}
Features
- Source generator —
[Job]on a class emits a typed executor, DI extension method, and optional recurring startup (IHostedService) - Recurring jobs —
[Job(Cron = "0 * * * *")]or[Job(Every = Every.Hour)]— scheduled via Cronos at startup - Retry with backoff — exponential retry up to
MaxAttempts(per-job or global); dead-letters after exhaustion - Multiple backends — InMemory (dev/test), EF Core (SQL Server / PostgreSQL / SQLite), Redis
- Dashboard — embedded HTML/JS dashboard via
app.MapJobsDashboard("/jobs") - Blazor component —
<JobsDashboard>Razor component for integration into Blazor apps - Mediator bridge —
[Job]+IRequest<Unit>auto-registersMediatorJobTypeExecutor<T>, routing execution through ZeroAlloc.Mediator pipeline behaviors - Native AOT compatible — no reflection at runtime; all dispatch resolved at compile time
Dashboard
An embedded HTML/JS dashboard — summary cards for each job state, a live-refreshing table with per-row requeue / delete actions, and fully responsive down to mobile widths.
app.MapJobsDashboard("/jobs");
// Optional: protect with auth
app.MapJobsDashboard("/jobs").RequireAuthorization("AdminPolicy");
Tablet (768 × 1024) and mobile (375 × 812) captures live in docs/screenshots/.
See Dashboard for the full endpoint reference and the Blazor component.
Packages
| Package | Description |
|---|---|
ZeroAlloc.Scheduling |
Core interfaces, worker service, scheduler |
ZeroAlloc.Scheduling.Generator |
Source generator (analyzer reference) |
ZeroAlloc.Scheduling.InMemory |
In-process store for development and testing |
ZeroAlloc.Scheduling.EfCore |
EF Core store (SQL Server, PostgreSQL, SQLite) |
ZeroAlloc.Scheduling.Redis |
Redis store for distributed deployments |
ZeroAlloc.Scheduling.Dashboard |
Embedded HTML dashboard (MapJobsDashboard) |
ZeroAlloc.Scheduling.Dashboard.Blazor |
Blazor component library |
ZeroAlloc.Scheduling.Mediator |
ZeroAlloc.Mediator bridge |
Documentation
| Page | Description |
|---|---|
| Getting Started | Install and schedule your first job in five minutes |
| Source Generator | [Job], Every, Cron, generated extension methods |
| Backends | InMemory, EF Core, and Redis store configuration |
| Dashboard | Embedded HTML dashboard and Blazor component |
| Mediator Bridge | Route job execution through ZeroAlloc.Mediator |
| Diagnostics | ZASCH001 compiler warning reference |
| Performance | Throughput, allocation profile, and tuning guide |
License
MIT
| 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 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. |
-
net10.0
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.3)
- ZeroAlloc.Outbox (>= 1.2.1)
- ZeroAlloc.Scheduling (>= 1.1.1)
- ZeroAlloc.ValueObjects.EfCore (>= 1.3.1)
-
net8.0
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.3)
- ZeroAlloc.Outbox (>= 1.2.1)
- ZeroAlloc.Scheduling (>= 1.1.1)
- ZeroAlloc.ValueObjects.EfCore (>= 1.3.1)
-
net9.0
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.3)
- ZeroAlloc.Outbox (>= 1.2.1)
- ZeroAlloc.Scheduling (>= 1.1.1)
- ZeroAlloc.ValueObjects.EfCore (>= 1.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.34 | 0 | 9/3/2026 |
| 1.2.33 | 25 | 9/2/2026 |
| 1.2.32 | 46 | 9/2/2026 |
| 1.2.31 | 37 | 9/1/2026 |
| 1.2.30 | 73 | 8/31/2026 |
| 1.2.29 | 77 | 8/30/2026 |
| 1.2.28 | 74 | 8/30/2026 |
| 1.2.27 | 82 | 8/26/2026 |
| 1.2.26 | 92 | 8/24/2026 |
| 1.2.25 | 85 | 8/23/2026 |
| 1.2.24 | 94 | 8/23/2026 |
| 1.2.23 | 93 | 8/22/2026 |
| 1.2.22 | 101 | 8/22/2026 |
| 1.2.21 | 89 | 8/21/2026 |
| 1.2.20 | 92 | 8/20/2026 |
| 1.2.19 | 163 | 8/19/2026 |
| 1.2.18 | 88 | 8/18/2026 |
| 1.2.17 | 93 | 8/17/2026 |
| 1.2.16 | 97 | 8/16/2026 |
| 1.1.1 | 114 | 5/3/2026 |