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
<PackageReference Include="Orphis.Hangfire.Console.Extensions" Version="3.0.0" />
paket add Orphis.Hangfire.Console.Extensions --version 3.0.0
#r "nuget: Orphis.Hangfire.Console.Extensions, 3.0.0"
// 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
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 | Versions 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. |
-
net8.0
- Hangfire.Console (>= 1.4.3)
- Hangfire.Core (>= 1.8.14)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Configuration (>= 8.0.0)
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 | 90 | 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.