Kck.BackgroundJobs.Abstractions
4.8.0
See the version list below for details.
dotnet add package Kck.BackgroundJobs.Abstractions --version 4.8.0
NuGet\Install-Package Kck.BackgroundJobs.Abstractions -Version 4.8.0
<PackageReference Include="Kck.BackgroundJobs.Abstractions" Version="4.8.0" />
<PackageVersion Include="Kck.BackgroundJobs.Abstractions" Version="4.8.0" />
<PackageReference Include="Kck.BackgroundJobs.Abstractions" />
paket add Kck.BackgroundJobs.Abstractions --version 4.8.0
#r "nuget: Kck.BackgroundJobs.Abstractions, 4.8.0"
#:package Kck.BackgroundJobs.Abstractions@4.8.0
#addin nuget:?package=Kck.BackgroundJobs.Abstractions&version=4.8.0
#tool nuget:?package=Kck.BackgroundJobs.Abstractions&version=4.8.0
Kck.BackgroundJobs.Abstractions
Provider-agnostic background job scheduling abstractions — fire-and-forget, recurring, and delayed jobs without coupling to Hangfire or Quartz.
Installation
dotnet add package Kck.BackgroundJobs.Abstractions
Quick Start
using Kck.BackgroundJobs.Abstractions;
// Program.cs — a provider (Kck.BackgroundJobs.Quartz or .Hangfire) and your jobs
builder.Services.AddKckBackgroundJobsQuartz();
builder.Services.AddKckJob<DailyReportJob>();
// A job: resolved from DI, so it can take dependencies
public class DailyReportJob(ILogger<DailyReportJob> logger) : IBackgroundJob
{
public Task ExecuteAsync(CancellationToken ct = default)
{
logger.LogInformation("Building the daily report");
return Task.CompletedTask;
}
}
// Schedule from anywhere
public class ReportScheduler(IJobScheduler scheduler)
{
public async Task ScheduleAsync(CancellationToken ct)
{
await scheduler.EnqueueAsync<DailyReportJob>(ct); // now
await scheduler.ScheduleAsync<DailyReportJob>(TimeSpan.FromMinutes(5), ct); // delayed
// 5-field crontab (as the CronExpressions constants) works with Hangfire and Quartz ("0 8 * * *" = 08:00 daily).
await scheduler.AddOrUpdateRecurringAsync<DailyReportJob>("daily-report", "0 8 * * *", ct);
}
}
Configuration
| Property | Description | Default |
|---|---|---|
BackgroundJobs:Provider |
Hangfire or Quartz |
Hangfire |
BackgroundJobs:ConnectionString |
Storage connection (Hangfire SQL/Redis) | In-memory |
BackgroundJobs:WorkerCount |
Concurrent worker count | 5 |
Resources
| 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. |
-
net10.0
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Kck.BackgroundJobs.Abstractions:
| Package | Downloads |
|---|---|
|
Kck.BackgroundJobs.Quartz
Quartz.NET-backed IJobScheduler implementation for the Kck framework. Provides fire-and-forget, delayed and cron-based job scheduling on Quartz.NET 4. Registered via AddKckBackgroundJobsQuartz(); jobs via AddKckJob<TJob>(). |
|
|
Kck.BackgroundJobs.Hangfire
Hangfire-backed IJobScheduler implementation for the Kck framework. Supports fire-and-forget, recurring (cron), and delayed job scheduling on Hangfire.Core (storage and dashboard packages are added by the application). Registered via AddKckJob<TJob>(). |
|
|
Kck.Bundle.WorkerService
Opinionated .NET Worker Service starter pack. Registers Serilog, health checks, InMemory event bus, and the Quartz background job scheduler in a single call. |
GitHub repositories
This package is not used by any popular GitHub repositories.