Masterly.NightShift.AspNetCore
1.0.0
dotnet add package Masterly.NightShift.AspNetCore --version 1.0.0
NuGet\Install-Package Masterly.NightShift.AspNetCore -Version 1.0.0
<PackageReference Include="Masterly.NightShift.AspNetCore" Version="1.0.0" />
<PackageVersion Include="Masterly.NightShift.AspNetCore" Version="1.0.0" />
<PackageReference Include="Masterly.NightShift.AspNetCore" />
paket add Masterly.NightShift.AspNetCore --version 1.0.0
#r "nuget: Masterly.NightShift.AspNetCore, 1.0.0"
#:package Masterly.NightShift.AspNetCore@1.0.0
#addin nuget:?package=Masterly.NightShift.AspNetCore&version=1.0.0
#tool nuget:?package=Masterly.NightShift.AspNetCore&version=1.0.0
Masterly.NightShift.AspNetCore
ASP.NET Core integration for Masterly.NightShift: the dashboard as middleware or a mapped endpoint, ASP.NET Core health checks, and /health and Prometheus /metrics endpoints for probes and scrapers.
This is a package of Masterly.NightShift, reliable background jobs for .NET. Most apps install that meta-package, which brings this one with the core and the SQL Server storage.
Install
dotnet add package Masterly.NightShift
or, to pick the storage yourself:
dotnet add package Masterly.NightShift.AspNetCore
- Target frameworks:
net8.0,net10.0 - Dependencies:
Masterly.NightShift.NetCore, and the ASP.NET Core shared framework
Example
The dashboard behind an authorization policy, with health checks for the server and the cluster:
using Masterly.NightShift;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddNightShift(config => config
.UseSqlServerStorage(builder.Configuration.GetConnectionString("NightShift")!));
builder.Services.AddNightShiftServer();
// Your app's authentication goes here (cookies, OpenID Connect...); the policy needs a signed-in user
builder.Services.AddAuthorization(options =>
options.AddPolicy("NightShiftAdmins", policy => policy.RequireRole("Admin")));
builder.Services.AddHealthChecks()
.AddNightShift(options => options.Scope = NightShiftHealthCheckScope.Process, name: "nightshift-server", tags: ["live"])
.AddNightShift(name: "nightshift-cluster", tags: ["ready"]);
var app = builder.Build();
app.MapNightShiftDashboardWithNoAuthorizationFilters() // served at /nightshift
.RequireAuthorization("NightShiftAdmins");
app.MapHealthChecks("/health/live", new HealthCheckOptions { Predicate = check => check.Tags.Contains("live") });
app.MapHealthChecks("/health/ready", new HealthCheckOptions { Predicate = check => check.Tags.Contains("ready") });
app.Run();
Without an authorization setup, the dashboard only answers requests from the local machine.
Documentation
Dashboard options, authorization, every page, customization and the health and metrics endpoints are covered in the full documentation: https://a7mdfre7at.github.io/Masterly.NightShift/docs/dashboard
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 | Versions 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. |
-
net10.0
- Masterly.NightShift.NetCore (>= 1.0.0)
-
net8.0
- Masterly.NightShift.NetCore (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Masterly.NightShift.AspNetCore:
| 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 |
Release notes for version 1.0.0: https://github.com/a7mdfre7at/Masterly.NightShift/blob/master/CHANGELOG.md