{"id":49260680,"url":"https://github.com/zeroalloc-net/zeroalloc.scheduling","last_synced_at":"2026-04-28T10:01:11.430Z","repository":{"id":352848345,"uuid":"1216886161","full_name":"ZeroAlloc-Net/ZeroAlloc.Scheduling","owner":"ZeroAlloc-Net","description":"Source-generated background job scheduler for .NET 8 and .NET 10. Decorate a class with [Job] and the Roslyn generator wires up the executor, DI registration, and recurring startup — no reflection at runtime.","archived":false,"fork":false,"pushed_at":"2026-04-26T19:59:02.000Z","size":579,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T09:25:11.239Z","etag":null,"topics":["background-jobs","blazor","csharp","dotnet","efcore","job-scheduler","redis","roslyn","scheduling","source-generator"],"latest_commit_sha":null,"homepage":"https://scheduling.zeroalloc.net","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZeroAlloc-Net.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T10:28:34.000Z","updated_at":"2026-04-26T19:58:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ZeroAlloc-Net/ZeroAlloc.Scheduling","commit_stats":null,"previous_names":["zeroalloc-net/zeroalloc.scheduling"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ZeroAlloc-Net/ZeroAlloc.Scheduling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Scheduling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Scheduling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Scheduling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Scheduling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeroAlloc-Net","download_url":"https://codeload.github.com/ZeroAlloc-Net/ZeroAlloc.Scheduling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Scheduling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32375625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-jobs","blazor","csharp","dotnet","efcore","job-scheduler","redis","roslyn","scheduling","source-generator"],"created_at":"2026-04-25T07:04:26.694Z","updated_at":"2026-04-28T10:01:11.408Z","avatar_url":"https://github.com/ZeroAlloc-Net.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZeroAlloc.Scheduling\n\n[![NuGet](https://img.shields.io/nuget/v/ZeroAlloc.Scheduling.svg)](https://www.nuget.org/packages/ZeroAlloc.Scheduling)\n[![Build](https://github.com/ZeroAlloc-Net/ZeroAlloc.Scheduling/actions/workflows/ci.yml/badge.svg)](https://github.com/ZeroAlloc-Net/ZeroAlloc.Scheduling/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nZeroAlloc.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.\n\n## Install\n\n```bash\ndotnet add package ZeroAlloc.Scheduling\ndotnet add package ZeroAlloc.Scheduling.InMemory   # or EfCore / Redis\n```\n\nThe generator package must be added as an analyzer:\n\n```xml\n\u003cPackageReference Include=\"ZeroAlloc.Scheduling.Generator\" Version=\"*\" OutputItemType=\"Analyzer\" ReferenceOutputAssembly=\"false\" /\u003e\n```\n\n## Example\n\n```csharp\n// 1. Define a job — the generator picks it up automatically\n[Job(Every = Every.Hour)]\npublic sealed class CleanupExpiredSessionsJob : IJob\n{\n    private readonly ISessionRepository _repo;\n    public CleanupExpiredSessionsJob(ISessionRepository repo) =\u003e _repo = repo;\n\n    public async ValueTask ExecuteAsync(JobContext ctx, CancellationToken ct)\n        =\u003e await _repo.DeleteExpiredAsync(ct);\n}\n\n// 2. Register — generated AddCleanupExpiredSessionsJob() wires executor + recurring startup\nservices.AddScheduling()\n        .AddSchedulingInMemory()\n        .AddCleanupExpiredSessionsJob();\n\n// 3. Enqueue a one-off job from application code\npublic class OrderService(IScheduler scheduler)\n{\n    public async Task CompleteOrderAsync(Order order, CancellationToken ct)\n    {\n        await ProcessAsync(order, ct);\n        await scheduler.EnqueueAsync(new SendOrderConfirmationJob(order.Id), ct);\n    }\n}\n```\n\n## Features\n\n- **Source generator** — `[Job]` on a class emits a typed executor, DI extension method, and optional recurring startup (`IHostedService`)\n- **Recurring jobs** — `[Job(Cron = \"0 * * * *\")]` or `[Job(Every = Every.Hour)]` — scheduled via Cronos at startup\n- **Retry with backoff** — exponential retry up to `MaxAttempts` (per-job or global); dead-letters after exhaustion\n- **Multiple backends** — InMemory (dev/test), EF Core (SQL Server / PostgreSQL / SQLite), Redis\n- **Dashboard** — embedded HTML/JS dashboard via `app.MapJobsDashboard(\"/jobs\")`\n- **Blazor component** — `\u003cJobsDashboard\u003e` Razor component for integration into Blazor apps\n- **Mediator bridge** — `[Job]` + `IRequest\u003cUnit\u003e` auto-registers `MediatorJobTypeExecutor\u003cT\u003e`, routing execution through ZeroAlloc.Mediator pipeline behaviors\n- **Native AOT compatible** — no reflection at runtime; all dispatch resolved at compile time\n\n## Dashboard\n\nAn 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.\n\n```csharp\napp.MapJobsDashboard(\"/jobs\");\n\n// Optional: protect with auth\napp.MapJobsDashboard(\"/jobs\").RequireAuthorization(\"AdminPolicy\");\n```\n\n![Scheduler dashboard — desktop](docs/screenshots/dashboard-desktop.png)\n\nTablet (768 × 1024) and mobile (375 × 812) captures live in [`docs/screenshots/`](docs/screenshots/).\n\nSee [Dashboard](docs/dashboard.md) for the full endpoint reference and the Blazor component.\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| `ZeroAlloc.Scheduling` | Core interfaces, worker service, scheduler |\n| `ZeroAlloc.Scheduling.Generator` | Source generator (analyzer reference) |\n| `ZeroAlloc.Scheduling.InMemory` | In-process store for development and testing |\n| `ZeroAlloc.Scheduling.EfCore` | EF Core store (SQL Server, PostgreSQL, SQLite) |\n| `ZeroAlloc.Scheduling.Redis` | Redis store for distributed deployments |\n| `ZeroAlloc.Scheduling.Dashboard` | Embedded HTML dashboard (`MapJobsDashboard`) |\n| `ZeroAlloc.Scheduling.Dashboard.Blazor` | Blazor component library |\n| `ZeroAlloc.Scheduling.Mediator` | ZeroAlloc.Mediator bridge |\n\n## Documentation\n\n| Page | Description |\n|------|-------------|\n| [Getting Started](docs/getting-started.md) | Install and schedule your first job in five minutes |\n| [Source Generator](docs/source-generator.md) | `[Job]`, `Every`, `Cron`, generated extension methods |\n| [Backends](docs/stores.md) | InMemory, EF Core, and Redis store configuration |\n| [Dashboard](docs/dashboard.md) | Embedded HTML dashboard and Blazor component |\n| [Mediator Bridge](docs/mediator-bridge.md) | Route job execution through ZeroAlloc.Mediator |\n| [Diagnostics](docs/diagnostics.md) | ZASCH001 compiler warning reference |\n| [Performance](docs/performance.md) | Throughput, allocation profile, and tuning guide |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.scheduling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.scheduling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.scheduling/lists"}