Rask.Jobs
0.23.0
See the version list below for details.
dotnet add package Rask.Jobs --version 0.23.0
NuGet\Install-Package Rask.Jobs -Version 0.23.0
<PackageReference Include="Rask.Jobs" Version="0.23.0" />
<PackageVersion Include="Rask.Jobs" Version="0.23.0" />
<PackageReference Include="Rask.Jobs" />
paket add Rask.Jobs --version 0.23.0
#r "nuget: Rask.Jobs, 0.23.0"
#:package Rask.Jobs@0.23.0
#addin nuget:?package=Rask.Jobs&version=0.23.0
#tool nuget:?package=Rask.Jobs&version=0.23.0
Rask.Jobs
Durable background jobs for a Rask app — enqueued work that runs off the request thread, stored in the app's own database, with no broker or Redis.
- Mark a type
IBackgroundJoband it dispatches to an ordinary Rask.CqrsICommandHandler<TJob>— a job is a command executed later. - A background
JobProcessorpolls theJobtable and runs each due job — at-least-once, with exponential-backoff retries up toMaxAttempts(then left as a dead letter for inspection). - Delayed (
ScheduleAsync(job, delay)) and durable interval-recurring (AddRecurring<T>(name, every, …)) jobs — recurring runs are tracked in the DB, so a restart never double-runs them. Read the schedule back fromJobOptions.RecurringJobs. - Metrics on the
Rask.Jobsmeter: processed / failed / dead-lettered counters, a duration histogram, and pending / dead-letter gauges.rask.jobs.deadlettersis the one to alert on. - A source generator registers every
IBackgroundJobtype for reflection-free rehydration on the run path.
Use
public sealed record SendWelcomeEmail(Guid UserId) : IBackgroundJob;
public sealed class SendWelcomeEmailHandler(IEmailSender email) : ICommandHandler<SendWelcomeEmail>
{
public Task HandleAsync(SendWelcomeEmail cmd, CancellationToken ct) => email.SendWelcomeAsync(cmd.UserId, ct);
}
// Program.cs
builder.Services.AddRaskCqrs();
builder.Services.AddRaskJobs<AppDbContext>(o =>
o.AddRecurring<PurgeStaleCarts>("purge-carts", every: TimeSpan.FromHours(1), () => new PurgeStaleCarts()));
// AppDbContext.OnModelCreating: modelBuilder.AddRaskJobs();
// then: rask db add AddJobs && rask db update
// enqueue from anywhere IJob is injected:
await jobs.EnqueueAsync(new SendWelcomeEmail(user.Id));
await jobs.ScheduleAsync(new SendReminder(order.Id), delay: TimeSpan.FromHours(24));
Register your context as an IDbContextFactory<AppDbContext> (Rask Server sessions are long-lived).
Several instances is safe: each processor leases the batch it claims, so a job runs on exactly one of
them. On SQLite you will still usually run one, because SQLite is single-writer, so the processor claims
work by polling and writing sequentially. Need a job to commit atomically with a business change? Raise a domain event and deliver it with
Rask.Outbox instead — the two pillars are complementary.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net11.0 is compatible. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Rask.Cqrs (>= 0.23.0)
-
net11.0
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Rask.Cqrs (>= 0.23.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Rask.Jobs:
| Package | Downloads |
|---|---|
|
Rask.Server
The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core. |
|
|
Rask.Dashboard
A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_rask and shows the outbox, background jobs, queued mail, cache and stored files from the application's own database — queue depth, dead letters, the errors behind them, stored email previews, the recurring-job schedule, SQLite pragmas and backup status. A live log tail is built in, and becomes a searchable history when Rask.Logging is installed. Panels appear only for the batteries the app actually registered. Protected by an authorization policy that fails closed outside Development. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.23.1-alpha.0.84 | 25 | 9/25/2026 |
| 0.23.1-alpha.0.82 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.81 | 14 | 9/25/2026 |
| 0.23.1-alpha.0.80 | 19 | 9/25/2026 |
| 0.23.1-alpha.0.79 | 28 | 9/25/2026 |
| 0.23.1-alpha.0.78 | 20 | 9/25/2026 |
| 0.23.1-alpha.0.76 | 31 | 9/25/2026 |
| 0.23.1-alpha.0.74 | 29 | 9/25/2026 |
| 0.23.1-alpha.0.72 | 42 | 9/25/2026 |
| 0.23.1-alpha.0.70 | 29 | 9/25/2026 |
| 0.23.1-alpha.0.69 | 32 | 9/25/2026 |
| 0.23.1-alpha.0.68 | 32 | 9/25/2026 |
| 0.23.1-alpha.0.67 | 39 | 9/25/2026 |
| 0.23.1-alpha.0.66 | 32 | 9/24/2026 |
| 0.23.1-alpha.0.65 | 41 | 9/24/2026 |
| 0.23.1-alpha.0.64 | 36 | 9/24/2026 |
| 0.23.1-alpha.0.62 | 39 | 9/24/2026 |
| 0.23.1-alpha.0.61 | 30 | 9/24/2026 |
| 0.23.1-alpha.0.50 | 35 | 9/24/2026 |
| 0.23.0 | 165 | 9/18/2026 |