Soenneker.Hangfire.Util 3.0.25

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.25
                    
NuGet\Install-Package Soenneker.Hangfire.Util -Version 3.0.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="Soenneker.Hangfire.Util" Version="3.0.25" />
                    
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.25" />
                    
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.25
                    
#r "nuget: Soenneker.Hangfire.Util, 3.0.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.
#addin nuget:?package=Soenneker.Hangfire.Util&version=3.0.25
                    
Install Soenneker.Hangfire.Util as a Cake Addin
#tool nuget:?package=Soenneker.Hangfire.Util&version=3.0.25
                    
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.AddHangfireUtilAsSingleton();

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 380 14 days ago
3.0.63 150 14 days ago
3.0.62 152 14 days ago
3.0.61 143 14 days ago
3.0.60 138 14 days ago
3.0.59 153 15 days ago
3.0.58 151 15 days ago
3.0.57 140 15 days ago
3.0.56 146 15 days ago
3.0.55 135 15 days ago
3.0.54 140 15 days ago
3.0.53 142 15 days ago
3.0.52 138 15 days ago
3.0.51 150 15 days ago
3.0.50 146 15 days ago
3.0.49 140 15 days ago
3.0.48 132 15 days ago
3.0.47 138 15 days ago
3.0.46 141 15 days ago
3.0.45 136 15 days ago
3.0.44 143 15 days ago
3.0.43 158 16 days ago
3.0.42 143 16 days ago
3.0.41 142 16 days ago
3.0.40 133 16 days ago
3.0.39 140 16 days ago
3.0.38 139 16 days ago
3.0.37 142 16 days ago
3.0.36 139 16 days ago
3.0.35 138 16 days ago
3.0.34 135 16 days ago
3.0.33 142 16 days ago
3.0.32 146 16 days ago
3.0.31 136 17 days ago
3.0.30 124 17 days ago
3.0.29 112 17 days ago
3.0.28 116 17 days ago
3.0.27 122 17 days ago
3.0.26 90 17 days ago
3.0.25 86 17 days ago
3.0.24 96 17 days ago
3.0.23 66 17 days ago
3.0.22 69 17 days ago
3.0.21 63 18 days ago
3.0.20 70 18 days ago
3.0.19 78 18 days ago
3.0.18 69 18 days ago
3.0.17 75 18 days ago
3.0.16 82 18 days ago
3.0.15 138 19 days ago
3.0.14 135 19 days ago
3.0.13 131 21 days ago
3.0.12 135 21 days ago
3.0.11 141 22 days ago
3.0.10 147 22 days ago
3.0.9 146 22 days ago
3.0.8 136 22 days ago
3.0.7 76 24 days ago
3.0.6 82 24 days ago
3.0.5 458 a month ago
3.0.4 462 a month ago
3.0.3 456 a month ago
3.0.2 456 a month ago
3.0.1 258 a month ago