Orphis.Hangfire.Console.Extensions 3.0.0

dotnet add package Orphis.Hangfire.Console.Extensions --version 3.0.0                
NuGet\Install-Package Orphis.Hangfire.Console.Extensions -Version 3.0.0                
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="Orphis.Hangfire.Console.Extensions" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Orphis.Hangfire.Console.Extensions --version 3.0.0                
#r "nuget: Orphis.Hangfire.Console.Extensions, 3.0.0"                
#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.
// Install Orphis.Hangfire.Console.Extensions as a Cake Addin
#addin nuget:?package=Orphis.Hangfire.Console.Extensions&version=3.0.0

// Install Orphis.Hangfire.Console.Extensions as a Cake Tool
#tool nuget:?package=Orphis.Hangfire.Console.Extensions&version=3.0.0                

Hangfire.Console.Extensions

NuGet version

Features

  • Makes it easier to use Hangfire.Console with .net core dependency injection

Setup

In .NET Core's Startup.cs:

public void ConfigureServices(IServiceCollection services)
{
    services.AddHangfireConsoleExtensions();
}

Starting a job

To start a job you can use the IJobManager, it will automatically check if you are currently inside a job, if that is the case it will mark the started job as a Continuation.

Log

Instead of logging using the extension method on PerformContext you can now just use the ILogging and it will get logged to both normal logging facilities and Hangfire.Console.

Progressbar

To create a progress bar you can use IProgressBarFactory.

IJobCancellationToken

Just take the IJobCancellationToken as a constructor parameter to get a hold of the cancellation token.

Schedule jobs

Contains a extension method for AddOrUpdateManuallyTriggered if you have a job that should only be run manually.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.0 91 10/7/2024

3.0.0
* Switched back from IdentityStream.Hangfire.Console to Hangfire.Console
2.0.0
* Breaking change moved from Hangfire.Console to IdentityStream.Hangfire.Console
1.2.0
* Upgraded package dependencies
1.1.0
* Added IRecurringJobManager.AddOrUpdateManuallyTriggered
* Added StartAndWaitAsync overload without result
* Fixed bug in StartAndWaitAsync (y-weiner found and fixed it)
1.0.5
* Upgraded dependencies
1.0.4
* Fixed issue that caused the first job to not log to hangfire console.
1.0.3
* Fixed issue when using both Hangfire.Console.Extensions and Hangfire.Console.Extensions.Serilog
1.0.2
* Added support for getting the PerformingContext with the constructor.