Soenneker.Hangfire.Util 3.0.8

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Hangfire.Util --version 3.0.8
                    
NuGet\Install-Package Soenneker.Hangfire.Util -Version 3.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="Soenneker.Hangfire.Util" Version="3.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Hangfire.Util" Version="3.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Hangfire.Util" />
                    
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 Soenneker.Hangfire.Util --version 3.0.8
                    
#r "nuget: Soenneker.Hangfire.Util, 3.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.
#addin nuget:?package=Soenneker.Hangfire.Util&version=3.0.8
                    
Install Soenneker.Hangfire.Util as a Cake Addin
#tool nuget:?package=Soenneker.Hangfire.Util&version=3.0.8
                    
Install Soenneker.Hangfire.Util as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Hangfire.Util

A general-purpose, reusable utility class for managing Hangfire background jobs

Installation

dotnet add package Soenneker.Hangfire.Util
builder.Services.Configure<HangfireUtilOptions>(options =>
{
    options.BatchSize = 200;
    options.NotifyOnUnhandledFailedJobs = true;

    options.ShouldDeleteFailedJob = job =>
    {
        // Example: Only delete jobs older than 7 days
        return job.FailedAt < DateTime.UtcNow.AddDays(-7);
    };

    options.ShouldDeleteSucceededJob = job =>
    {
        // Example: Delete all successful jobs older than 1 day
        return job.SucceededAt < DateTime.UtcNow.AddDays(-1);
    };
});

// Register the HangfireUtil service
builder.Services.AddSingleton<IHangfireUtil, HangfireUtil>();

RecurringJob.AddOrUpdate<IHangfireUtil>($"{nameof(IHangfireUtil.DeleteFailedJobs)}", c => c.DeleteFailedJobs(),  "0 0 * * *");
Product 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. 
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
3.0.64 419 20 days ago
3.0.63 150 20 days ago
3.0.62 155 20 days ago
3.0.61 143 20 days ago
3.0.60 138 20 days ago
3.0.59 154 20 days ago
3.0.58 152 20 days ago
3.0.57 141 20 days ago
3.0.56 147 20 days ago
3.0.55 136 21 days ago
3.0.54 140 21 days ago
3.0.53 142 21 days ago
3.0.52 138 21 days ago
3.0.51 150 21 days ago
3.0.50 146 21 days ago
3.0.49 140 21 days ago
3.0.48 135 21 days ago
3.0.47 138 21 days ago
3.0.46 141 21 days ago
3.0.45 136 21 days ago
3.0.44 144 21 days ago
3.0.43 158 21 days ago
3.0.42 143 21 days ago
3.0.41 142 21 days ago
3.0.40 136 21 days ago
3.0.39 140 21 days ago
3.0.38 139 21 days ago
3.0.37 142 22 days ago
3.0.36 139 22 days ago
3.0.35 138 22 days ago
3.0.34 135 22 days ago
3.0.33 142 22 days ago
3.0.32 146 22 days ago
3.0.31 136 22 days ago
3.0.30 124 22 days ago
3.0.29 112 22 days ago
3.0.28 116 22 days ago
3.0.27 122 22 days ago
3.0.26 90 23 days ago
3.0.25 86 23 days ago
3.0.24 96 23 days ago
3.0.23 66 23 days ago
3.0.22 70 23 days ago
3.0.21 63 23 days ago
3.0.20 70 23 days ago
3.0.19 78 23 days ago
3.0.18 69 24 days ago
3.0.17 75 24 days ago
3.0.16 82 24 days ago
3.0.15 138 25 days ago
3.0.14 135 25 days ago
3.0.13 131 a month ago
3.0.12 135 a month ago
3.0.11 141 a month ago
3.0.10 147 a month ago
3.0.9 146 a month ago
3.0.8 136 a month ago
3.0.7 76 a month ago
3.0.6 82 a month ago
3.0.5 462 a month ago
3.0.4 467 a month ago
3.0.3 460 a month ago
3.0.2 460 a month ago
3.0.1 258 a month ago