Masterly.NightShift.SqlServer 1.0.0

dotnet add package Masterly.NightShift.SqlServer --version 1.0.0
                    
NuGet\Install-Package Masterly.NightShift.SqlServer -Version 1.0.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="Masterly.NightShift.SqlServer" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Masterly.NightShift.SqlServer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Masterly.NightShift.SqlServer" />
                    
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 Masterly.NightShift.SqlServer --version 1.0.0
                    
#r "nuget: Masterly.NightShift.SqlServer, 1.0.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 Masterly.NightShift.SqlServer@1.0.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=Masterly.NightShift.SqlServer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Masterly.NightShift.SqlServer&version=1.0.0
                    
Install as a Cake Tool

Masterly.NightShift.SqlServer

SQL Server storage for Masterly.NightShift background jobs. Jobs, their state history, queues, recurring jobs and statistics are kept in a set of tables that the storage creates and upgrades itself. Databases created by Hangfire keep working.

This is a package of Masterly.NightShift, reliable background jobs for .NET.

NuGet

Install

dotnet add package Masterly.NightShift.SqlServer

Example

Add a connection string to appsettings.json:

{
  "ConnectionStrings": {
    "NightShift": "Server=.\\sqlexpress;Database=MyApp;Integrated Security=True;TrustServerCertificate=True;"
  }
}

Then register the storage (here in an ASP.NET Core app with the Masterly.NightShift meta-package):

using Masterly.NightShift;
using Masterly.NightShift.SqlServer;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddNightShift(config => config
    .UseSqlServerStorage(builder.Configuration.GetConnectionString("NightShift")!));
builder.Services.AddNightShiftServer();

var app = builder.Build();

app.MapNightShiftDashboard();

app.Run();

On the first start the storage creates its tables in the [HangFire] schema of the MyApp database. The database itself must already exist.

Documentation

Connection strings, database permissions, every SqlServerStorageOptions property and schema upgrades are covered in the full documentation: https://a7mdfre7at.github.io/Masterly.NightShift/docs/storage

License

MIT AND LGPL-3.0-or-later: code written for Masterly.NightShift is MIT, code derived from Hangfire stays under the LGPL. The package contains both license texts.

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 (1)

Showing the top 1 NuGet packages that depend on Masterly.NightShift.SqlServer:

Package Downloads
Masterly.NightShift

Background jobs that work the night shift: fire-and-forget, delayed, recurring and continuation jobs for .NET, stored in SQL Server, with a dashboard. Installs the core library, SQL Server storage and the ASP.NET Core integration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 11/16/2026