mrjamiebowman.Hangfire.JobManagement 9.0.8

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

mrjamiebowman.Hangfire.JobManagement (.NET 8)

NuGet Build status Build Status Official Site License MIT

NOTE: This is a fork that's going a different direction. Just getting started... Below will be updated. - 05/27/2024 @mrjamiebowman

A robust extension to .NET Hangfire that adds a Job Management Dashboard, Notifications, and Settings.

Features (Coming Soon!)
  • Dashboard
  • Start / Stops Jobs
  • Edit Jobs
  • Job Notifications (Web Hooks, Message Queues, Emails)
  • Search Capabilities
  • Batch Jobs
  • Job History
  • Settings
Requirements
  • MSSQL Server
  • .NET 8
Dockerized & Ready for Kubernetes (Helm Charts)

// TODO: Share GitHub Sample.

Instructions

Install a package from NuGet.

Install-Package Hangfire.JobManagement

Then add this in your code:

For .NET

for service side:

// job management
builder.Services.ConfigureJobManagement(builder.Configuration);

// hangfire
services.AddHangfire(h => h.UseSqlServerStorage(Configuration.GetConnectionString("HangfireConnection"))
    /* job management */
    .UseJobManagement(jobManagementConfig, b => {
        // assemblies
        b.ConfigureAssemblies(new Assembly[] {
            typeof(Program).Assembly
        });

        // database
        b.ConfigureDatabase();

        // features
        b.ConfigureFeatures(f => {
            f.Notifications = true;
            f.Settings = true;
        });
    })

Controller Job Management

Typically, I use a controller to rapidly set up (Add or Update) or remove all of the jobs rapidly. This is useful for deploying to multiple environments.

app.MapGet("/setup/jobs", () =>
{
    var recurringJobOptions = new RecurringJobOptions();

    // jobs
    RecurringJob.AddOrUpdate<IJobLogCleanUp>("LogCleanup", job => job.ExecuteAsync(null, null, CancellationToken.None), Cron.Daily);
    RecurringJob.AddOrUpdate<IJobReports>("Reports", job => job.ExecuteAsync(null, null, CancellationToken.None), Cron.Daily);

    return "OK";
})
    .WithName("JobSetup")
    //.RequireAuthorization()
    .WithOpenApi();

app.MapGet("/setup/remove", () =>
{
    // remove if exists...
    RecurringJob.RemoveIfExists("LogCleanup");
    RecurringJob.RemoveIfExists("Reports");

    return "OK";
})
    .WithName("JobRemoval")
    //.RequireAuthorization()
    .WithOpenApi();

app.MapGet("/up", () => {
    return "UP";
})
    .WithName("up")
    .WithOpenApi();

EntityFramework Core

# install tool
dotnet tool install --global dotnet-ef

# migrations
dotnet ef migrations add -v -p ./src/Hangfire.JobManagement/Hangfire.JobManagement.csproj -c JobManagementDbContext -s ../../src/MrJB.Hangfire/ -o ./src/Hangfire.JobManagement/Data/Migrations initial

Credits

This project was inspired by other Hangfire projects and forked from Brayan Mota's RecurringJobAdmin.

  • Braulio Alvarez - original developer of Hangfire.RecurringJobAdmin
  • Brayan Mota (bamotav) - forked his project.

License

This project is under MIT license. You can obtain the license copy here.

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 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. 
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
9.0.8 427 9/18/2025
8.0.2 653 10/31/2024
8.0.1 194 10/19/2024
8.0.0 168 10/19/2024
2.0.1 492 6/6/2024
2.0.0 241 5/28/2024