Bsft.Scheduling.EFCore 2.2.0

dotnet add package Bsft.Scheduling.EFCore --version 2.2.0
                    
NuGet\Install-Package Bsft.Scheduling.EFCore -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bsft.Scheduling.EFCore" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bsft.Scheduling.EFCore" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Bsft.Scheduling.EFCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bsft.Scheduling.EFCore --version 2.2.0
                    
#r "nuget: Bsft.Scheduling.EFCore, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bsft.Scheduling.EFCore@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bsft.Scheduling.EFCore&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Bsft.Scheduling.EFCore&version=2.2.0
                    
Install as a Cake Tool

Bsft.Scheduling.EFCore

The persistence half of the Bsft.Scheduling family: job runs in the application's own DbContext, so a delayed job survives a restart and several instances coordinate their leases through the database.

Install

dotnet add package Bsft.Scheduling.EFCore

Requires Bsft.Scheduling (pulled transitively), Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Relational. The database provider and the DbContext itself belong to the host; this package only supplies the entity, its configuration and the store.

Register

services.AddDbContext<AppDbContext>(o => o.UseSqlServer(connectionString));

services.AddBsftScheduling();
services.AddBsftSchedulingEFCore<AppDbContext>();

AppDbContext implements IJobDbContext and applies JobRunEntityConfiguration, through ApplyConfigurationsFromAssembly(typeof(JobRunEntityConfiguration).Assembly) or an explicit ApplyConfiguration call, and the resulting JobRuns table needs a migration. Either registration order works: the core registers its in-memory store with TryAdd and this call removes whatever is registered before adding the EF Core one, so neither can silently win over the other.

The persisted schedule catalog is a separate, independent registration:

services.AddBsftStoredSchedulesEFCore<AppDbContext>();

AppDbContext implements IStoredScheduleDbContext and applies StoredScheduleEntityConfiguration, and the resulting StoredSchedules table needs a migration too. The interface is deliberately separate from IJobDbContext: a host that already implements it for delayed and recurring jobs is not broken by a new required member the moment it adopts the catalog, and a host that only wants the job store carries no table it never queries.

Configure

Option Default Effect
JobRunEntityConfiguration.DefaultPendingFilter [IsRecurring] = 1 AND [Status] = 0 The SQL predicate behind the unique index that allows at most one pending occurrence per recurring job. Written for SQL Server and SQLite, whose identifier quoting matches.
new JobRunEntityConfiguration(pendingFilter) the default filter A provider whose quoting differs supplies its own — PostgreSQL needs "IsRecurring" = true AND "Status" = 0. Passing null leaves a plain index: no filter and no uniqueness, and with the uniqueness goes the guarantee that two instances seeding at the same moment cannot both create an occurrence of the same recurring job.

This package declares no options type of its own and therefore no configuration section: everything an operator decides lives in BsftSchedulingOptions, and everything the schema decides is a constructor argument of the entity configuration. Validation: none beyond what the core validates.

Extend

IJobDbContext is the only seam this package declares, and it is the one the host implements: the DbSet<JobRunEntity> the store reads and writes, plus SaveChangesAsync. It stays here rather than in the core package because its signature names EF Core types.

EFCoreJobStore itself is internal — it is the IJobStore implementation this package registers, and a host that wants different persistence writes its own IJobStore against the core package instead of subclassing this one. JobRunEntity and JobRunEntityConfiguration are public so that a host can name them in a migration, a query of its own or a model customisation.

IStoredScheduleDbContext is the matching seam for the stored-schedule catalog: the DbSet<StoredScheduleEntity> the store reads and writes, plus SaveChangesAsync. EFCoreStoredScheduleStore is internal for the same reason EFCoreJobStore is; StoredScheduleEntity and StoredScheduleEntityConfiguration are public for the same reason JobRunEntity and its configuration are.

Documentation

Topic page: docs/scheduling.md. Conventions: docs/package-conventions.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 84 10/23/2026
2.1.0 110 9/28/2026