Milvasoft.Milvaion.Sdk.Worker.Hangfire 10.1.1

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

Milvaion Hangfire Integration

license NuGet
NuGet

Milvaion Hangfire Integration allows you to monitor your existing Hangfire jobs through Milvaion's dashboard without changing your scheduler. Keep using Hangfire for scheduling while gaining Milvaion's monitoring, alerting, and metrics capabilities.


Features

  • Zero-Code Job Changes - Your existing Hangfire jobs work as-is
  • Automatic Job Tracking - Jobs are automatically tracked when executed
  • Real-time Monitoring - Track job executions, durations, and failures in Milvaion dashboard
  • Execution Tracking - Every job execution is recorded with status, duration, and result
  • Worker Heartbeats - Automatic health monitoring and status updates
  • Metrics Integration - Jobs contribute to EPM, average duration, and success rate metrics
  • Cancellation Detection - Tracks when jobs are deleted or cancelled

Installation

dotnet add package Milvasoft.Milvaion.Sdk.Worker.Hangfire

Quick Start

1. Configure Services

using Hangfire;
using Milvasoft.Milvaion.Sdk.Worker.Hangfire.Extensions;

var builder = Host.CreateApplicationBuilder(args);

// Add Milvaion Hangfire integration
builder.Services.AddMilvaionHangfireIntegration(builder.Configuration);

// Register your job classes
builder.Services.AddTransient<MyEmailJob>();

// Configure Hangfire
builder.Services.AddHangfire((sp, config) =>
{
    config.UsePostgreSqlStorage(connectionString);
    
    // Enable Milvaion filter
    config.UseMilvaion(sp);
});

builder.Services.AddHangfireServer();

var host = builder.Build();

// Register recurring jobs
using (var scope = host.Services.CreateScope())
{
    var manager = scope.ServiceProvider.GetRequiredService<IRecurringJobManager>();
    
    manager.AddOrUpdate<MyEmailJob>(
        "daily-email",
        job => job.SendAsync(CancellationToken.None),
        Cron.Daily);
}

await host.RunAsync();

2. Configure appsettings.json

{
  "Worker": {
    "WorkerId": "hangfire-worker-1",
    "RabbitMQ": {
      "Host": "localhost",
      "Port": 5672,
      "Username": "guest",
      "Password": "guest"
    },
    "Redis": {
      "ConnectionString": "localhost:6379"
    },
    "ExternalScheduler": {
      "SourceName": "Hangfire"
    }
  }
}

3. Create Jobs (Standard Hangfire Jobs)

public class MyEmailJob(ILogger<MyEmailJob> logger)
{
    public async Task SendAsync(CancellationToken cancellationToken)
    {
        logger.LogInformation("Starting email job...");
        
        // Your job logic here
        await SendEmailsAsync(cancellationToken);
        
        logger.LogInformation("Email job completed!");
    }
}

Dashboard Features

External jobs appear in Milvaion dashboard with:

  • Full execution history
  • Duration and success rate metrics
  • Limited edit capabilities (display name, description, tags)

Documentation

For complete documentation, visit: Milvaion Documentation

License

This project is licensed under the MIT License.

Product 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. 
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
10.1.1 39 5/21/2026
10.1.0 102 3/25/2026
10.0.17 98 3/8/2026
10.0.16 96 3/5/2026
10.0.15 114 2/10/2026
10.0.14 114 2/5/2026
10.0.13 110 2/5/2026
10.0.12 115 2/4/2026