net8.0net9.0net10.0
Blazor component library for ZeroAlloc.Scheduling dashboard.
Published
Apr 22, 2026
6mo ago
Total Downloads
9.2K
9,231
Install
dotnet add package ZeroAlloc.Scheduling.Dashboard.Blazor --version 0.1.1
| Product | Versions |
|---|---|
| .NET |
README
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
dotnet add package ZeroAlloc.Scheduling
dotnet add package ZeroAlloc.Scheduling.InMemory # or EfCore / Redis
The generator package must be added as an analyzer:
<PackageReference Include="ZeroAlloc.Scheduling.Generator" Version="*" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
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()
.AddSchedulingInMemory()
.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
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
Changes from Previous Version
No structural changes between v0.0.1 and v0.1.1.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.