Hangfire.Core 1.8.25

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

Hangfire

Official Site Latest version Downloads License LGPLv3 Coverity Scan

Build Status

  main dev
AppVeyor Windows Build Status Windows Build Status

Overview

Incredibly easy way to perform fire-and-forget, delayed and recurring jobs in .NET applications. CPU and I/O intensive, long-running and short-running jobs are supported. No Windows Service / Task Scheduler required. Backed by Redis, SQL Server, SQL Azure and MSMQ.

Hangfire provides a unified programming model to handle background tasks in a reliable way and run them on shared hosting, dedicated hosting or in cloud. You can start with a simple setup and grow computational power for background jobs with time for these scenarios:

  • mass notifications/newsletters
  • batch import from xml, csv or json
  • creation of archives
  • firing off web hooks
  • deleting users
  • building different graphs
  • image/video processing
  • purging temporary files
  • recurring automated reports
  • database maintenance
  • …and so on

Hangfire is a .NET alternative to Resque, Sidekiq, delayed_job, Celery.

Hangfire Dashboard

Installation

Hangfire is available as a NuGet package. You can install it using the NuGet Package Console window:

PM> Install-Package Hangfire

After installation, update your existing OWIN Startup file with the following lines of code. If you do not have this class in your project or don't know what is it, please read the Quick start guide to learn about how to install Hangfire.

public void Configuration(IAppBuilder app)
{
    GlobalConfiguration.Configuration.UseSqlServerStorage("<connection string or its name>");
    
    app.UseHangfireServer();
    app.UseHangfireDashboard();
}

Usage

This is an incomplete list of features; to see all of them, check the official site and the documentation.

Fire-and-forget tasks

Dedicated worker pool threads execute queued background jobs as soon as possible, shortening your request's processing time.

BackgroundJob.Enqueue(() => Console.WriteLine("Simple!"));

Delayed tasks

Scheduled background jobs are executed only after a given amount of time.

BackgroundJob.Schedule(() => Console.WriteLine("Reliable!"), TimeSpan.FromDays(7));

Recurring tasks

Recurring jobs have never been simpler; just call the following method to perform any kind of recurring task using the CRON expressions.

RecurringJob.AddOrUpdate(() => Console.WriteLine("Transparent!"), Cron.Daily);

Continuations

Continuations allow you to define complex workflows by chaining multiple background jobs together.

var id = BackgroundJob.Enqueue(() => Console.WriteLine("Hello, "));
BackgroundJob.ContinueWith(id, () => Console.WriteLine("world!"));

Process background tasks inside a web application…

You can process background tasks in any OWIN-compatible application framework, including ASP.NET MVC, ASP.NET Web API, FubuMvc, Nancy, etc. Forget about AppDomain unloads, Web Garden & Web Farm issues – Hangfire is reliable for web applications from scratch, even on shared hosting.

app.UseHangfireServer();

… or anywhere else

In console applications, Windows Service, Azure Worker Role, etc.

using (new BackgroundJobServer())
{
    Console.WriteLine("Hangfire Server started. Press ENTER to exit...");
    Console.ReadLine();
}

Questions? Problems?

Open-source projects develop more smoothly when discussions are public.

If you have any questions, problems related to Hangfire usage or if you want to discuss new features, please visit the discussion forum. You can sign in there using your existing Google or GitHub account, so it's very simple to start using it.

If you've discovered a bug, please report it to the Hangfire GitHub Issues. Detailed reports with stack traces, actual and expected behaviours are welcome.

Please see the Extensions page on the official site.

Building the sources

Prerequisites:

  • Razor Generator: Required if you intend to edit the cshtml files.
  • Install the MSMQ service (Microsoft Message Queue Server), if not already installed.

Then, create an environment variable with Variable name Hangfire_SqlServer_ConnectionStringTemplate and put your connection string in the Variable value field. Example:

  • Variable name: Hangfire_SqlServer_ConnectionStringTemplate
  • Variable value: Data Source=.\sqlexpress;Initial Catalog=Hangfire.SqlServer.Tests;Integrated Security=True;

To build a solution and get assembly files, just run the following command. All build artifacts, including *.pdb files, will be placed into the build folder. Before proposing a pull request, please use this command to ensure everything is ok. Btw, you can execute this command from the Package Manager Console window.

build

To build NuGet packages as well as an archive file, use the pack command as shown below. You can find the result files in the build folder.

build pack

To see the full list of available commands, pass the -docs switch:

build -docs

Hangfire uses psake build automation tool. All psake tasks and functions defined in psake-build.ps1 (for this project) and psake-common.ps1 (for other Hangfire projects) files. Thanks to the psake project, they are very simple to use and modify!

Razor templates are compiled upon save with the Razor Generator Visual Studio extension. You will need this installed if you want to modify the Dashboard UI.

Reporting security issues

In order to give the community time to respond and upgrade we strongly urge you report all security issues privately. Please email us at security@hangfire.io with details and we will respond ASAP. Security issues always take precedence over bug fixes and feature work. We can and do mark releases as "urgent" if they contain serious security fixes.

License

Copyright © 2013-2026 Hangfire OÜ.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

By submitting a Pull Request, you disavow any rights or claims to any changes submitted to the Hangfire project and assign the copyright of those changes to Hangfire OÜ.

If you cannot or do not want to reassign those rights (your employment contract for your employer may not allow this), you should not submit a PR. Open an issue and someone else can do the work.

This is a legal way of saying "If you submit a PR to us, that code becomes ours". 99.9% of the time that's what you intend anyways; we hope it doesn't scare you away from contributing.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net451 is compatible.  net452 was computed.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (634)

Showing the top 5 NuGet packages that depend on Hangfire.Core:

Package Downloads
Hangfire.SqlServer

SQL Server 2008+ (including Express), SQL Server LocalDB and SQL Azure storage support for Hangfire, a background job framework for .NET applications.

Hangfire

An easy and reliable way to perform fire-and-forget, delayed and recurring, long-running, short-running, CPU or I/O intensive tasks inside ASP.NET applications. No Windows Service / Task Scheduler required. Even ASP.NET is not required. Backed by Redis, SQL Server, SQL Azure or MSMQ. This is a .NET alternative to Sidekiq, Resque and Celery. https://www.hangfire.io/

Hangfire.NetCore

.NET Core's Worker Service host support for Hangfire, a background job framework for .NET applications.

Hangfire.PostgreSql

PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications).

Hangfire.MemoryStorage

A memory storage for Hangfire

GitHub repositories (57)

Showing the top 20 popular GitHub repositories that depend on Hangfire.Core:

Repository Stars
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
MassTransit/MassTransit
Distributed Application Framework for .NET
Xabaril/AspNetCore.Diagnostics.HealthChecks
Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Arcenox-co/TickerQ
TickerQ is a fast, reflection-free background task scheduler for .NET built with source generators, EF Core integration, cron + time-based execution, and a real-time dashboard.
fullstackhero/blazor-starter-kit
Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
thepirat000/Audit.NET
An extensible framework to audit executing operations in .NET
eventflow/EventFlow
Async/await first CQRS+ES and DDD framework for .NET
BrighterCommand/Brighter
A framework for building messaging apps with .NET and C#.
fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat
可能是全网最完整的 C# 版微信 SDK,封装全部已知的微信 OpenAPI,包含微信公众平台(订阅号+服务号+小程序+小游戏+小商店+视频号)、微信开放平台、微信商户平台(微信支付+微企付)、企业微信、微信广告平台、微信智能对话开放平台等模块,可跨平台。持续随官方更新,欢迎 Star/Fork/PR。QQ 交流群 875580418【满】、930461548【满】、611974621。
CoreUnion/CoreShop
基于 Asp.Net Core 9.0、Uni-App开发,支持可视化布局的小程序商城系统,前后端分离,支持分布式部署,跨平台运行,拥有分销、代理、团购、拼团、秒杀、直播、优惠券、自定义表单等众多营销功能,拥有完整SKU、下单、售后、物流流程。支持一套代码编译发布微信小程序版、H5版、Android版、iOS版、支付宝小程序版、字节跳动小程序版、QQ小程序版等共10个平台。
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
UiPath/CoreWF
WF runtime ported to work on .NET 6
trueai-org/module-shop
一个基于 .NET 8.0 构建的简单、跨平台、模块化的商城系统
HTBox/allReady
This repo contains the code for allReady, an open-source solution focused on increasing awareness, efficiency and impact of preparedness campaigns as they are delivered by humanitarian and disaster response organizations in local communities.
getsentry/sentry-dotnet
Sentry SDK for .NET
laochiangx/ABP-ASP.NET-Boilerplate-Project-CMS
ABP module-zero +AdminLTE+Bootstrap Table+jQuery+Redis + sql server+quartz+hangfire权限管理系统
open-telemetry/opentelemetry-dotnet-contrib
This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
marcoCasamento/Hangfire.Redis.StackExchange
HangFire Redis storage based on original (and now unsupported) Hangfire.Redis but using lovely StackExchange.Redis client
gmf520/osharp-v4
osharp framework with .net framework version 4.x
Version Downloads Last Updated
1.8.25 46,966 8/28/2026
1.8.24 1,807,447 7/16/2026
1.8.23 11,277,698 2/5/2026
1.8.22 8,874,181 11/7/2025
1.8.21 7,647,099 8/12/2025
1.8.20 9,347,630 5/16/2025
1.8.19 150,641 5/16/2025
1.8.18 12,250,174 2/17/2025
1.8.17 9,413,407 12/3/2024
1.8.16 901,966 11/27/2024
1.8.15 4,306,581 10/23/2024
1.8.14 16,428,657 6/11/2024
1.8.12 9,121,892 4/3/2024
1.8.11 4,054,811 2/23/2024
1.8.10 2,935,202 2/12/2024
1.8.9 2,385,176 1/24/2024
1.8.7 3,255,383 12/29/2023
1.7.37 792,580 4/8/2024
Loading failed

Release notes are available in our blog https://www.hangfire.io/blog/
Please see https://docs.hangfire.io/en/latest/upgrade-guides/upgrading-to-hangfire-1.8.html to learn how to upgrade.

1.8.25
• Fixed – Add missing Persian translations for Dashboard UI (by @mohammad-goroohi).
• Fixed – Small typo in Swedish translation (by @AntonHoog).
• Fixed – Grammar and spelling in some user-facing messages (by @net0well).
• Fixed – Complete "pt-BR" translation (@by net0well).
• Fixed – Update Russian translation for Dashboard UI (by @akortunov).
• Project – Add unit tests for DisableConcurrentExecutionAttribute (by @net0well).
• Project – Use "mailto" scheme for security email in SECURITY.md (by @FirmaSpring).

1.8.24
• Added – Russian translation for Dashboard UI (by @akortunov).
• Changed – Slow log can now detect blocked extension filter executions.

1.8.23
• Changed – Use stable sorting algorithm for background job filters again (by @jirikanda).
• Fixed – Add missing keys for Swedish translation (by @karl-sjogren).
• Fixed – Custom `AutomaticRetryAttribute` is ignored under certain conditions (by @jirikanda).
• Project – Use `TypeNameAssemblyFormatHandling` in tests with .NET 6 (by @viktor-vintertass).

1.8.22
• Added – `IGlobalConfiguration.UseNoOpLogProvider` method to disable logging.
• Changed – Un-deprecate interval methods in the `Cron` class, add remarks in docs instead.
• Changed – Bump internalized version of Cronos to 0.11.1.
• Changed – Bump internalized version of Microsoft.Owin to 4.2.3.
• Fixed – Serialization of arrays of nested types `SimpleAssemblyTypeSerializer`.
• Fixed – Remove wrong escaping characters in Portuguese translations on the "Servers" page.
• Fixed – Properly remove registered `IBackgroundProcessingServer` instances on OWIN app shutdown.
• Fixed – `AspNetShutdownDetector` for early ASP.NET shutdown detection is not working (regression from 1.7.30).
• Project – Replace the `netcoreapp3.1` target with the `net8.0` one in tests.

1.8.21
• Added – `FailedState.IncludeFileInfo` to optionally show/hide line numbers in exceptions in Failed state.
• Changed – Include line numbers for exceptions by default when available.
• Fixed – Portuguese (Brazil) translations in Strings.pt-BR.resx (by @pedro-cons).
• Fixed – Static `BackgroundJob` class always acquires the most current `JobStorage.Current` instance.
• Fixed – Static `RecurringJob` class always acquires the most current `JobStorage.Current` instance.

1.8.20
• Fixed – Glyphicons from Bootstrap are not displaying after upgrading to version 1.8.19.