CodeDesignPlus.Net.Hangfire
0.13.0-beta.12839
dotnet add package CodeDesignPlus.Net.Hangfire --version 0.13.0-beta.12839
NuGet\Install-Package CodeDesignPlus.Net.Hangfire -Version 0.13.0-beta.12839
<PackageReference Include="CodeDesignPlus.Net.Hangfire" Version="0.13.0-beta.12839" />
<PackageVersion Include="CodeDesignPlus.Net.Hangfire" Version="0.13.0-beta.12839" />
<PackageReference Include="CodeDesignPlus.Net.Hangfire" />
paket add CodeDesignPlus.Net.Hangfire --version 0.13.0-beta.12839
#r "nuget: CodeDesignPlus.Net.Hangfire, 0.13.0-beta.12839"
#:package CodeDesignPlus.Net.Hangfire@0.13.0-beta.12839
#addin nuget:?package=CodeDesignPlus.Net.Hangfire&version=0.13.0-beta.12839&prerelease
#tool nuget:?package=CodeDesignPlus.Net.Hangfire&version=0.13.0-beta.12839&prerelease
<br /> <p align="center"> <a href="https://github.com/codedesignplus/CodeDesignPlus.Net.Sdk/tree/main/packages/CodeDesignPlus.Net.Hangfire"> <img src="https://i.imgur.com/PwbGy0o.png" alt="Logo"> </a>
<h3 align="center">CodeDesignPlus.Net.Hangfire</h3>
<p align="center"> Wrapper de Hangfire para el ecosistema CodeDesignPlus: Redis como storage, auto-descubrimiento de jobs y dashboard opcional. <br /> <a href="https://codedesignplus.com"> <strong>Explore the docs »</strong> </a> <br /> <br /> <a href="https://github.com/codedesignplus/CodeDesignPlus.Net.Sdk/issues"> <img src="https://img.shields.io/github/issues/codedesignplus/CodeDesignPlus.Net.Sdk?color=0088ff&style=for-the-badge&logo=github" alt="issues"/> </a> <a href="https://github.com/codedesignplus/CodeDesignPlus.Net.Sdk/pulls"> <img src="https://img.shields.io/github/issues-pr/codedesignplus/CodeDesignPlus.Net.Sdk?color=0088ff&style=for-the-badge&logo=github" alt="pull requests"/> </a> </p> </p>
About The Project
CodeDesignPlus.Net.Hangfire es un paquete NuGet del SDK de CodeDesignPlus que integra Hangfire como motor de background jobs en microservicios .NET 9.
Key Features
- Redis Storage: Usa
IRedisFactorydel ecosistema CodeDesignPlus para obtener la conexión Redis sin configuración adicional. - Auto-descubrimiento de jobs: Detecta automáticamente clases que implementan
IRecurrentJoben el ensamblado del microservicio. - Atributo declarativo: Decora tus jobs con
[RecurringJobOptions("0 6 * * *")]para definir el cron directamente en la clase. - Dashboard opcional: Habilita el panel de Hangfire con autenticación básica vía
Dashboard.Enable = true. - Options Pattern: Configuración centralizada en la sección
Hangfiredeappsettings.json.
Getting Started
Configuración en appsettings.json
{
"Hangfire": {
"Enable": true,
"Prefix": "hangfire:ms-invoicing:",
"WorkerCount": 2,
"Queues": ["default", "critical"],
"Dashboard": {
"Enable": true,
"Username": "admin",
"Password": "your-secure-password"
}
}
}
Registro en Program.cs
// Registra Hangfire con Redis y auto-descubre los jobs del ensamblado
builder.Services.AddHangfire<Program>(builder.Configuration);
// En el pipeline HTTP
app.UseHangfireDashboard<Program>(app.Configuration);
Definir un job recurrente
[RecurringJobOptions("0 6 * * *", jobId: "daily-report", timezone: "America/Bogota")]
public class DailyReportJob : IRecurrentJob
{
public Task ExecuteAsync(IJobCancellationToken cancellationToken)
{
// lógica del job
return Task.CompletedTask;
}
}
License
Distributed under the LGPL-3.0 License. See LICENSE for more information.
Contact
CodeDesignPlus - support@codedesignplus.com
Project Link: CodeDesignPlus.Net.Sdk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.0
- CodeDesignPlus.Net.Hangfire.Abstractions (>= 0.13.0-beta.12839)
- CodeDesignPlus.Net.Redis.Abstractions (>= 0.13.0-beta.12839)
- Hangfire.AspNetCore (>= 1.8.23)
- Hangfire.Dashboard.BasicAuthorization (>= 1.0.2)
- Hangfire.Mongo (>= 1.15.0)
- Hangfire.Redis.StackExchange (>= 1.12.0)
- Microsoft.Extensions.Options (>= 9.0.7)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.7)
- Microsoft.Extensions.Options.DataAnnotations (>= 9.0.7)
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 |
|---|---|---|
| 0.13.0-beta.12839 | 0 | 5/20/2026 |
| 0.13.0-beta.12822 | 242 | 5/18/2026 |
| 0.13.0-beta.12816 | 44 | 5/18/2026 |
| 0.13.0-beta.12815 | 80 | 5/17/2026 |
| 0.13.0-beta.12808 | 54 | 5/17/2026 |