FastJobs.SqlServer
1.0.1
dotnet add package FastJobs.SqlServer --version 1.0.1
NuGet\Install-Package FastJobs.SqlServer -Version 1.0.1
<PackageReference Include="FastJobs.SqlServer" Version="1.0.1" />
<PackageVersion Include="FastJobs.SqlServer" Version="1.0.1" />
<PackageReference Include="FastJobs.SqlServer" />
paket add FastJobs.SqlServer --version 1.0.1
#r "nuget: FastJobs.SqlServer, 1.0.1"
#:package FastJobs.SqlServer@1.0.1
#addin nuget:?package=FastJobs.SqlServer&version=1.0.1
#tool nuget:?package=FastJobs.SqlServer&version=1.0.1
Fastjobs
Welcome to the Quick Start Guide for Getting up and running with FastJobs .
FastJobs is a lightweight .NET background job processing library built for simplicity and speed.
Features
- Job types: fire-and-forget (enqueued), delayed/scheduled, and recurring jobs (interval or cron), defined from lambda expressions or
IBackGroundJobclasses - Chained jobs: run jobs in sequence with
CreateChain(...)andThenRun(...) - After actions: run follow-up actions once a job finishes
- Retries: configurable max retries with exponential backoff and jitter, plus
TerminateJobExceptionto fail a job immediately without retrying - Expiration: jobs, including recurring jobs, move to an
Expiredstate once they pass their expiry, which releases their queue entry and resource lock - Misfire handling:
Skip,FireOnceandSmartmisfire policies for recurring jobs, with a background misfire detector - Orphaned recurring job recovery: a sweeper reschedules recurring jobs that are no longer tracked by the scheduling pipeline
- Database cleanup: pluggable pruning strategies for completed and expired jobs (off by default)
- Worker observability: worker heartbeats and state tracking
- Web dashboard: optional Blazor dashboard for jobs, workers and summary metrics
- Pluggable persistence: storage is provider based (see below), with automatic schema initialization
Supported Databases
| Database | Package | Dependency class |
|---|---|---|
| MariaDB / MySQL | FastJobs.MariaDB |
FastJobMysqlDependencies |
| Microsoft SQL Server | FastJobs.SqlServer |
FastJobMSSQLDependencies |
More providers are planned. Both providers are covered by integration tests that run against real databases using Testcontainers.
Full documentation lives in the docs folder (quickstart, configuration, enqueued/delayed/recurring jobs, after actions, monitoring).
As you read this guide, expect to see details of:
- Fastjobs Installation
- Configuration & Setup
Fastjobs Installation
You can install Fastjobs via the .NET CLI or the NuGet Package Manager.
.NET CLI
dotnet add package FastJobs
Package Manager Console (Visual Studio)
Install-Package FastJobs
NuGet Packages
FastJobs is split into focused packages so you only install what you need.
FastJobs Core engine already discussed above and required for all setups
FastJobs.Persistence Shared persistence abstractions and models used by the core engine and the providers (pulled in by the providers)
FastJobs.MariaDB Persistence provider for MariaDB / MySQL
dotnet add package FastJobs.MariaDB
FastJobs.SqlServer Persistence provider for Microsoft SQL Server
dotnet add package FastJobs.SqlServer
Install one persistence provider alongside the core package.
FastJobs.Dashboard Optional RCL dashboard for monitoring and observability
dotnet add package FastJobs.Dashboard
Configuration & Setup
Fastjobs Is Very Easy To Setup And Get Going. The main job scheduling services you will be interacting with live in the FastJobs namespace and the database providers in the FastJobs.Persistence namespace.
To use Fastjobs Add the following using statements
using FastJobs;
using FastJobs.Persistence;
Next Call builder.Services.AddFastJobs() with Options for extra config info like so
string connectionString = Environment.GetEnvironmentVariable("DB_CONNECTION_STRING");
// MariaDB / MySQL (FastJobs.MariaDB)
builder.Services.AddFastJobs(
option => { option.WorkerCount = 4; },
new FastJobMysqlDependencies(
options => options.ConnectionString = connectionString
)
);
// ...or Microsoft SQL Server (FastJobs.SqlServer)
// builder.Services.AddFastJobs(
// option => { option.WorkerCount = 4; },
// new FastJobMSSQLDependencies(
// options => options.ConnectionString = connectionString
// )
// );
//TO INCLUDE THE WEB DASHBOARD
builder.Services.AddFastjobsDashboard();
to Finish up configuration call use FastJobs()
var app = builder.Build();
app.Services.UseFastJobs();
if you would like to include the Web Dashboard NB: This Wont work if your application does not use a Web host
//ADD USING STATEMENT
using FastJobs.Dashboard;
/*{
DI And Services Setup
}*/
var app = builder.Build();
app.UseFastJobsDashboard("/Dashboard"); //should come before routing is done to allow rewriting path to internal Dashboard path
app.UseStaticFiles();
app.UseRouting();
app.UseAntiforgery();
//Expose Dashboard Components
app.MapFastJobsDashboard();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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. |
-
net9.0
- FastJobs.Persistence (>= 1.0.1)
- Microsoft.Data.SqlClient (>= 7.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging (>= 10.0.8)
- Microsoft.Extensions.Logging.Console (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.