![]() |
VOOZH | about |
dotnet add package Cultiv.Hangfire --version 5.5.2
NuGet\Install-Package Cultiv.Hangfire -Version 5.5.2
<PackageReference Include="Cultiv.Hangfire" Version="5.5.2" />
<PackageVersion Include="Cultiv.Hangfire" Version="5.5.2" />Directory.Packages.props
<PackageReference Include="Cultiv.Hangfire" />Project file
paket add Cultiv.Hangfire --version 5.5.2
#r "nuget: Cultiv.Hangfire, 5.5.2"
#:package Cultiv.Hangfire@5.5.2
#addin nuget:?package=Cultiv.Hangfire&version=5.5.2Install as a Cake Addin
#tool nuget:?package=Cultiv.Hangfire&version=5.5.2Install as a Cake Tool
Hangfire dashboard for Umbraco
This installs Hangfire and a dashboard in Umbraco, the dashboard is secured and is only available for users with access to the Settings section of Umbraco.
After installing this, you can add a Composer to start running scheduled tasks, for example:
using System.Threading;
using Hangfire;
using Hangfire.Console;
using Hangfire.Server;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
namespace MyNamespace
{
public class Composer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
RecurringJob.AddOrUpdate("do-it-id", () => DoIt(null), Cron.Hourly());
}
public void DoIt(PerformContext context)
{
var progressBar = context.WriteProgressBar();
var items = new int[10]{ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 };
foreach (var item in items.WithProgress(progressBar, items.Length))
{
context.WriteLine($"Number: {item}");
Thread.Sleep(1000);
}
}
}
}
In the Umbraco backoffice it will look a little something like this:
๐ Screenshot of Cultiv.Hangfire installed in Umbraco
By default, Hangfire processes jobs from the "default" queue. For scenarios where multiple applications or sites share the same Hangfire database, you can configure specific queues for each server to process:
{
"Hangfire": {
"Server": {
"QueueNames": ["app1", "shared", "default"]
}
}
}
Each Hangfire server will only process jobs from its configured queues. Queues are processed in the order specified, so jobs in earlier queues have higher priority.
To enqueue jobs to a specific queue:
BackgroundJob.Enqueue(() => DoWork(), new EnqueuedState("app1"));
If no queue names are configured, the server will process the "default" queue.
Configure Hangfire's SQL Server storage behavior to optimize performance and reduce database load:
{
"Hangfire": {
"StorageOptions": {
"QueuePollInterval": "00:00:15",
"PrepareSchemaIfNecessary": true,
"EnableHeavyMigrations": true,
"CommandBatchMaxTimeout": "00:05:00",
"SlidingInvisibilityTimeout": "00:05:00",
"UseRecommendedIsolationLevel": true,
"DisableGlobalLocks": true
}
}
}
Configuration options:
00:00:00 (immediate polling). Setting to 00:00:15 (15 seconds) significantly reduces database load in high-traffic scenarios while maintaining reasonable job pickup times.true)true)true)true)If you only want to access the Hangfire dashboard without running background job processing on a particular server:
{
"Hangfire": {
"Server": {
"Disabled": true
}
}
}
By default, the Hangfire dashboard appears as a dashboard within Umbraco's Settings section. You can optionally configure it as a standalone section with its own top-level menu item and separate permissions:
{
"Hangfire": {
"UseStandaloneSection": true
}
}
Key differences:
When enabled, administrators can grant users access to the Hangfire section independently from other sections by editing User Group permissions.
IComposers that schedule the jobs: [ComposeAfter(typeof(HangfireComposer))] (see this issue)| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Cultiv.Hangfire:
| Package | Downloads |
|---|---|
|
uSync.Complete.Hangfire
Hangfire helpers for uSync.Complete |
|
|
uSync.Hangfire
Hangfire helpers for uSync |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.5.2 | 7,139 | 3/28/2026 |
| 5.5.1 | 192 | 3/28/2026 |
| 5.5.0 | 720 | 3/19/2026 |
| 5.4.0 | 135 | 3/19/2026 |
| 5.3.0 | 138 | 3/19/2026 |
| 5.2.1 | 189 | 3/28/2026 |
| 5.2.0 | 6,764 | 12/7/2025 |
| 5.1.0 | 326 | 12/7/2025 |
| 5.0.0 | 698 | 11/28/2025 |
| 4.1.3 | 15,973 | 2/20/2025 |
| 4.1.2 | 399 | 2/20/2025 |
| 4.1.1 | 379 | 2/20/2025 |
| 4.1.0 | 370 | 2/20/2025 |
| 4.0.1 | 4,636 | 5/30/2024 |
| 4.0.0 | 536 | 5/8/2024 |
| 4.0.0-beta2 | 195 | 5/2/2024 |
| 4.0.0-beta1 | 242 | 3/7/2024 |
| 3.1.2 | 145,808 | 9/18/2023 |
| 3.1.1 | 394 | 9/18/2023 |
| 3.1.0 | 351 | 9/18/2023 |