NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #306 most downloaded on NuGet
ASP.NET Core support for Hangfire, a background job framework for .NET applications.
Latest stable
1.8.25
Last release 2 months ago
28 Aug 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
20 versions withdrawn
withdrawn after publishing
127 years old
113 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
Added – Display recurring job exceptions directly in the Dashboard UI.
Hangfire.Core
RecurringJobScheduler to stall the pipeline when extension filters throw an exception.DelayedJobScheduler to stall the pipeline when state filters throw an exception.JobLoadException when new methods deployed, caused by overlapped recycles in ASP.NET applications.Error field of a recurring job.NullReferenceException instead of InvalidOperationException when deserializing a job.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Added – Farsi translation for Dashboard UI (#1611 by @sepehr1101).
Hangfire.Core
PrefixPath in DashboardOptions (#1630 by @shenjielx).PageUrl to be overridden by subclass (#1613 by @brendonparker).Hangfire.SqlServer
XACT_ABORT option for ExpirationManager queries.NullReferenceException in logs thrown from SqlInternalTransaction.Rollback method (#1494).Fixed – Additional Chinese translation for Dashboard UI (by @brookqin).
Hangfire.Core
null checks for expired failed jobs in Dashboard UI (by @ppkale1995-cimpress).Hangfire.SqlServer
sp_getapplock.DbConnection instance when an exception occurs during its opening.Documentation
Deprecated – Deprecate the JobActivatorScope.InnerScope property as it wasn't implemented.
Hangfire.Core
IGlobalConfiguration.UseResultsInContinuations method to globally enable results for continuations.ContinuationsSupport.JobParameterInjectionFilter server filter to inject job parameters as arguments.UseBackgroundPool methods.CultureInfo.InvariantCulture is now restored properly in background jobs.null value is skipped when displaying job arguments in Dashboard UI.System.Diagnostics.Debug type in .NET Core 3.0.JobActivatorScope.InnerScope property as it wasn't implemented.Hangfire.SqlServer
System.Data.SqlClient dependency from SqlCommandBatch and ExpirationManager.Hangfire.AspNetCore
IAppBuilder.MapHangfireDashboard method for ASP.NET Core 3.0 endpoint routing (by @kendaleiv).netcoreapp3.0 target with "Microsoft.AspNetCore.App" framework reference (by @stebueh).Hangfire.NetCore
netcoreapp3.0 target with reference to "3.0.0" packages.Documentation
Changed – Produce a trace log message with details when updating a recurring job.
Hangfire.Core
CoreBackgroundJobFactory.Create when storage returns null.Readme.md file (PR #1526 by @231293).netcoreapp3.0 target framework for Hangfire.Core.Tests.*.cshtml files.Dashboard UI
RazorPage.Context property as a public member.Hangfire.SqlServer
UseFineGrainedLocks option to avoid deadlocks in some theoretical cases.UseSqlServerStorage with connection factory parameter only.-) in schema names (PR #1531 by @kendaleiv).netcoreapp3.0 target in Hangfire.SqlServer.Tests.Hangfire.AspNetCore
AddHangfireServer method for .NET Framework 4.6.1 and higher (PR #1488 by @danstur).Changed – Add support for dash characters (-) in queue names (PR #1469 by @augustoproiete).
Hangfire.Core
-) in queue names (PR #1469 by @augustoproiete).TaskScheduler is set to null.WaitOneAsync method.Fixed – Show error message when there's an error loading the statistics in Dashboard UI (PR #1242 by @prochnowc).
Hangfire.Core
LazyThreadSafetyMode.PublicationOnly to avoid caching "JobStorage.Current is null" exceptions.Hangfire.AspNetCore & Hangfire.NetCore
AddHangfireServer method with "options" action.Added – BackgroundJobClient.RetryAttempts property to make job creation resilient to transient exceptions.
Hangfire.Core
BackgroundJobClient.RetryAttempts property to make job creation resilient to transient exceptions.pt-BR (by @candidodmv).WaitOne and WaitOneAsync methods with timeout and cancellation token for WaitHandle class.Hangfire.SqlServer
SlidingInvisibilityTimeout fetching.Score column in the AddToSet method.This version contains security fixes to prevent possible XSS attacks as described in #1441. They don't relate to user data submitted to Hangfire direc…
This version contains security fixes to prevent possible XSS attacks as described in #1441. They don't relate to user data submitted to Hangfire directly via method arguments, but it's recommended to upgrade anyway. If you are using Hangfire 1.6, please upgrade to version 1.6.26 instead.
<dl> <dt>Affected Packages</dt><dd>Hangfire.Core ≤ 1.6.25, 1.7.0, 1.7.1, 1.7.2</dd> <dt>Affected Platforms</dt><dd>All, including .NET Core, .NET Framework, Mono of any version</dd> </dl>
Steps to reproduce
public static void Xss()
{
BackgroundJob.Enqueue(() => Xss2());
}
public static void Xss2()
{
throw new Exception("<script>alert(1);</script>");
}
Hangfire.Core
HtmlEncode in all remaining places in Dashboard UI to prevent XSS attacks.Cron.Never method for adding manual recurring jobs that never fire (by @michaltalaga).AddOrUpdate extension methods for the IRecurringJobManager interface.HtmlHelper.FormatProperties method is now obsolete.Hangfire.SqlServer
In order to give the community time to respond and upgrade we strongly urge you report all security issues privately. Please email us at support@hangfire.io with details and we will respond ASAP. Security issues always take precedence over bug fixes and feature work. We can and do mark releases as "urgent" if they contain serious security fixes.
> Please see https://docs.hangfire.io/en/latest/upgrade-guides/upgrading-to-hangfire-1.7.html to learn how to upgrade from 1.6.X.
Please see https://docs.hangfire.io/en/latest/upgrade-guides/upgrading-to-hangfire-1.7.html to learn how to upgrade from 1.6.X.
Hangfire.Core
DashboardOptions.TimeZoneResolver property to handle custom time zone resolvers in Dashboard UI.RecurringJob.AddOrUpdate method is now able to update a broken recurring job.Hangfire.AspNetCore & Hangfire.NetCore
ITimeZoneResolver service for the DashboardOptions.TimeZoneResolver property.IJobFilterProvider service from the AddHangfire method.Hangfire.SqlServer
> Please see https://docs.hangfire.io/en/latest/upgrade-guides/upgrading-to-hangfire-1.7.html to learn how to upgrade to 1.7.X.
Please see https://docs.hangfire.io/en/latest/upgrade-guides/upgrading-to-hangfire-1.7.html to learn how to upgrade to 1.7.X.
This is a patch release that adds some nice features for Dashboard UI, knows how to deal with recurring jobs with invalid Cron expressions, and contains some minor improvements for SQL Server storage. Also, Hangfire.NetCore package was added to support new .NET Core Worker Service applications without referencing any ASP.NET Core packages.
Hangfire.Core
DashboardOptions.IgnoreAntiforgeryToken property to disable token validation in Dashboard UI.InvalidOperationException when AllowSynchronousIO option isn't set in ASP.NET Core 3.0.NextExecution value to null when existing recurring job has an invalid Cron expression.UseSerializationSettings comment now contains correct method name (by @PaitoAnderson).resx files now re-generated automatically when building a project.Hangfire.NetCore
Hangfire.SqlServer
JobQueue table when using blocking query and don't have results.Changed – Make TaskScheduler.Default the default scheduler for async jobs to avoid breaking changes.
Please see the Upgrading to Hangfire 1.7 article to learn more about the upgrade steps.
Hangfire.Core
IGlobalConfiguration.SetDataCompatibilityLevel to enable rolling upgrades from version 1.6.IGlobalConfiguration.UseRecommendedSerializerSettings method for new installations.TaskScheduler can now be specified in BackgroundJobServerOptions for workers.IdempotentCompletionAttribute filter to enforce strict order for continuations.IBackgroundJobClient.ContinueJobWith methods to replace ContinueWith ones in future for clarity.JobStorage.LinearizableReads virtual property to avoid unnecessary waits in state changer.TaskScheduler.IJobCancellationToken can be replaced with CancellationToken (by @pieceofsummer).TimeZoneInfo resolvers in recurring jobs for interoperability purposes.QueueAttribute via patterns.PerformContext.Storage property to allow server filters to spawn connections.GetFirstByLowestScoreFromSet connection method overload that returns multiple items (by @cdschneider).JobDisplayNameAttribute class for displaying jobs in dashboard, available on .NET Core (by @pieceofsummer).ThreadAbortException and ThreadInterruptedException handling to keep the background process running.L, W, # characters.JobActivator.BeginScope method overload with the full PerformContext (by @jeroenvervaeke).TaskScheduler.Default the default scheduler for async jobs to avoid breaking changes.JsonConvert.DefaultSettings (Version_170 Switch).SerializeDateTime (Version_170 Switch).DateTime argument serialization (Version_170 Switch).AwaitingState.Expiration field (Version_170 Switch).TypeNameHandling.Auto option.SucceededState constructor public to allow state serialization.IBackgroundJobFactory.StateMachine property (breaking change for low level API).DelayedJobScheduler is able to use the new storage method to query multiple jobs at once.RecurringJobScheduler now uses index-based checks to fetch only those jobs that should be scheduled.DateTimeOffset conversion error when it was serialized with TypeConverter.Job class methods.SerializableAttribute.ArgumentNullException when job class contains method with non-resolvable generic arguments.Microsoft.NETCore.Portable.Compatibility.RecurringJobScheduler that may lead to job duplicates.JobActivator.NextExecution field of a recurring job has delay in value getting set.DataCompatibilityRangeFact and DataCompatibilityRangeTheory classes for compatibility checks.Hangfire.AspNetCore
IServiceProvider parameter (by @ericgreenmix and @denis-ivanov).BackgroundJobServerHostedService class based on IHostedService interface.IServiceCollection.AddHangfireServer method to register the server during configuration.Hangfire.SqlServer
Schema 7 migration to fix the IX_HangFire_Set_Score index to include the Key column.Schema 6 migration with less indexes, better physical layout and bigint support (disabled by default).SqlServerStorageOptions.EnableHeavyMigrations switch to automatically install even heavy migrations.SqlServerStorageOptions.DisableGlobalLocks property to avoid custom locking scheme.SqlServerStorageOptions.UsePageLocksOnDequeue property to use less CPU consuming fetch.SqlServerStorageOptions.UseRecommendedIsolationLevel option to set the minimum possible level.bigint type, or entirely removed.CreateExpiredJob method to avoid some round-trips.SqlParameter types explicitly to not to duplicate query plans.AddToQueue method when default provider is used.FetchedAt has expected value to prevent prolonging others' work.CountersAggregator.Int32.MaxValue.[Set] table.This is the second release candidate of the upcoming version 1.7.0 that fixes some issues and avoids some breaking changes. Please see the Upgrading t…
This is the second release candidate of the upcoming version 1.7.0 that fixes some issues and avoids some breaking changes. Please see the Upgrading to Hangfire 1.7 article to learn more about the upgrade steps.
Hangfire.Core
IdempotentCompletion filter to move a job to non-final and non-processing states.TaskScheduler.Default the default scheduler for async jobs to avoid breaking changes.BackgroundJobServer and RecurringJobScheduler classes.IBackgroundJobFactory.StateMachine property (breaking change for low level API).ConfigureAwait(false) is used (regression in RC 1).Hangfire.AspNetCore
IBackgroundJobFactory again.NullReferenceException when application is stopped due to an exception during the start.Hangfire.SqlServer
CountersAggregator, works only in MSSQL 2014.CONCAT function in migration script, works only in MSSQL 2012.This is the first release candidate of version 1.7 that adds a lot of new features and improvements and allows rolling upgrades from version 1.6.X and
This is the first release candidate of version 1.7 that adds a lot of new features and improvements and allows rolling upgrades from version 1.6.X and below. Detailed migration guide will be posted in the documentation next week, but the point of this release is to disable by default all the changes that are incompatible with 1.6 installations.
Known issues
CoreBackgroundJobPerformer class, there's a race condition that leads to deadlocks when running asynchronous job methods, when ConfigureAwait(false) method is called inside. This will be fixed in 1.7.0-rc2, and as a workaround, set the BackgroundJobServerOptions.TaskScheduler property to TaskScheduler.Default for your processing servers.Hangfire.SqlServer package to properly run the migration and execute CountersAggregator process. The required version will be lowered back to SQL Server 2008 R2 in 1.7.0-rc2.Upgrading from beta versions
If you are upgrading from 1.7.0 betas, upgrade all the servers first to the newest rc1 version and only then use add the following configuration lines to turn on the new features that were disabled by default in this release candidate. Please note that CompatibilityLevel.Version_170 contains some changes that your existing 1.7.0-beta servers may not understand.
GlobalConfiguration.Configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170) // Compact data representation
.UseSimpleAssemblyNameTypeSerializer() // Compact type serialization format
If you are using SQL Server as a job storage, set the following settings if you were using 1.7.0 betas just after updating the package. These settings are the same that were enabled by default for beta versions, so your existing servers are compatible with them.
.UseSqlServerStorage("connection_string", new SqlServerStorageOptions
{
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5)
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero, // Set only when using SlidingInvisibilityTimeout
DisableGlobalLocks = true, // Set only if `Schema 6` migration is applied
UsePageLocksOnDequeue = true // Set only if `Schema 6` migration is applied
})
Hangfire.Core
IGlobalConfiguration.SetDataCompatibilityLevel to enable rolling upgrades from version 1.6.IGlobalConfiguration.UseRecommendedSerializerSettings method for new installations.TaskScheduler can now be specified in BackgroundJobServerOptions for workers.IdempotentCompletionAttribute filter to enforce strict order for continuations.IBackgroundJobClient.ContinueJobWith methods to replace ContinueWith ones in future for clarity.JobStorage.LinearizableReads virtual property to avoid unnecessary waits in state changer.JsonConvert.DefaultSettings (Version_170 Switch).SerializeDateTime (Version_170 Switch).DateTime argument serialization (Version_170 Switch).AwaitingState.Expiration field (Version_170 Switch).SynchronizationContext for async methods to run their continuations on worker thread.TypeNameHandling.Auto option.SucceededState constructor public to allow state serialization.RecurringJobScheduler doesn't go into infinite loop when there's server of an older version.BackgroundTaskScheduler.MaximumConcurrencyLevel property.AwaitingState displays Option property as string again.DateTimeOffset conversion error when it was serialized with TypeConverter.Job class methods.SerializableAttribute.DataCompatibilityRangeFact and DataCompatibilityRangeTheory classes for compatibility checks.Hangfire.AspNetCore
Hangfire.SqlServer
SqlServerStorageOptions.EnableHeavyMigrations switch to automatically install even heavy migrations.Schema 7 migration to fix the IX_HangFire_Set_Score index to include the Key column.SqlServerStorageOptions.DisableGlobalLocks property to avoid custom locking scheme.SqlServerStorageOptions.UsePageLocksOnDequeue property to use less CPU consuming fetch.Schema 6 migration is disabled by default for existing installations, because it may take too long.ExpirationManager and CountersAggregator to their previous state.CountersAggregator to use clustered key for temp table.CountersAggregator.Changed – StopTimeout introduced in 1.7.0-beta3 now defaults to zero seconds (2ca6fc48edfbf370c5aa444496d5721c81fe2396).
Hangfire.Core
StopTimeout introduced in 1.7.0-beta3 now defaults to zero seconds (2ca6fc48edfbf370c5aa444496d5721c81fe2396).NotSupportedException thrown by RecurringJobScheduler (regression, 001ee0869d811ee34ec5f0af6d29ad2c47b26dc1).NotSupportedException thrown by DelayedJobScheduler (regression, 3c2ec58805bd8f3e210047f667260f98df4fdcae).RecurringJobManager.AddOrUpdate method doesn't preserve LastJobId (regression, 4748d7e9c1e3e0ac82ea21e18b8e2c99d034232e).IsBatchingAvailable method per connection type (6dc93e83c514c03a6d4459af9ddd3c3c0c8c3e84).Added – Multi-stage shutdown to wait for graceful completion before starting to abort jobs.
Hangfire.Core
IJobCancellationToken can be replaced with CancellationToken (PR #976 by @pieceofsummer).TimeZoneInfo resolvers in recurring jobs for interoperability purposes.QueueAttribute via patterns.PerformContext.Storage property to allow server filters to spawn connections.GetFirstByLowestScoreFromSet connection method overload that returns multiple items (PR #1251 by @cdschneider).DelayedJobScheduler is able to use the new storage method to query multiple jobs at once (PR #1330, #38).RecurringJobScheduler now uses index-based checks to fetch only those jobs that should be scheduled (PR #1334).ArgumentNullException when job class contains method with non-resolvable generic arguments.Microsoft.NETCore.Portable.Compatibility (#982, #1074).JsonSerializationException in .NET Core 2.0 (#1214).RecurringJobScheduler that may lead to job duplicates.JobActivator.TypeNameHandling.All is used.NextExecution field of a recurring job has delay in value getting set. (#843)Hangfire.AspNetCore
IServiceProvider parameter (#954 by @ericgreenmix and #1114 by @denis-ivanov).BackgroundJobServerHostedService class based on IHostedService interface (#962).IServiceCollection.AddHangfireServer method to register the server during configuration.Hangfire.SqlServer
SqlParameter types explicitly to not to duplicate query plans.AddToQueue method when default provider is used (PR #1331).FetchedAt has expected value to prevent prolonging others' work.The goal of this release is to incorporate important changes from recent versions 1.6.18, 1.6.19 and 1.6.20, as well as provide great improvements for
The goal of this release is to incorporate important changes from recent versions 1.6.18, 1.6.19 and 1.6.20, as well as provide great improvements for Hangfire.SqlServer unlocked by schema changes introduced in 1.7.0:
To use all the new features, consider adding the following lines to your configuration logic:
GlobalConfiguration.Configuration
.UseSqlServerStorage(@"connection_string", new SqlServerStorageOptions
{
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), // To enable Sliding invisibility fetching
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), // To enable command pipelining
QueuePollInterval = TimeSpan.FromTicks(1) // To reduce processing delays to minimum
})
Hangfire.Core
MissingMethodException when using Newtonsoft.Json 11 in .NET Core 2.X with continuations (by @pieceofsummer).Hangfire.SqlServer
This is a preview of the next release that contains important changes in a lot of subsystems. A completely new background processing engine introduced
This is a preview of the next release that contains important changes in a lot of subsystems. A completely new background processing engine introduced with support for both synchronous and asynchronous processes while using the same model. While processing is still not asynchronous, because storage methods aren't, it's a great step forward.
After dealing with a lot of daylight saving time transition issues, we've decided to build a completely new library to work with cron expression. So the Cronos project was born contains first-class support for time zones and knows about all the subtleties.
And last but not least, it contains major upgrades to the Hangfire.SqlServer package with the new optimized schema with much fewer indexes, and identity columns upgraded to the bigint type for those, who processed 2,147,483,647 background jobs.
Hangfire.Core
JobDisplayNameAttribute class for displaying jobs in dashboard, available on .NET Core (PR #993 by @pieceofsummer).ValueTask<T> and other await-compatible types (PR #974 by @pieceofsummer).ThreadAbortException and ThreadInterruptedException handling to keep the background process running (PR #1082).L, W, # characters (PR #853, #494).JobActivator.BeginScope method overload with the full PerformContext (PR #995 by @jeroenvervaeke, #828).Hangfire.SqlServer
bigint type, or entirely removed (PR #898).Int32.MaxValue (#749).Set table (#844).Fixed – Race condition in AspNetShutdownDetector leads to NullReferenceException (by @jr01).
Hangfire.Core
Backported from 1.7.19:
AspNetShutdownDetector leads to NullReferenceException (by @jr01).Hangfire.SqlServer
Backported from 1.7.21:
DisableConcurrentExecution for long-running jobs.Added – Add built-in support for reliable shutdown detection of ASP.NET apps.
Hangfire.Core
DelayedJobScheduler to stall the pipeline when state filters throw an exception.JobLoadException when new methods deployed, caused by overlapped recycles in ASP.NET applications.Hangfire.Core (backported from 1.7)
Hangfire.Core (backported from 1.7)
CultureInfo.InvariantCulture is now restored properly in background jobs.LazyThreadSafetyMode.PublicationOnly to avoid caching "JobStorage.Current is null" exceptions.Hangfire.SqlServer (backported from 1.7)
DbConnection instance when an exception occurs while trying to open it.This maintenance release contains some fixes for the Hangfire.SqlServer package, backported from recent 1.7.X versions.
This maintenance release contains some fixes for the Hangfire.SqlServer package, backported from recent 1.7.X versions.
Hangfire.SqlServer
CountersAggregator (#852).SqlParameter types explicitly to not to duplicate query plans and and avoid conversion issues.This version contains security fixes to prevent possible XSS attacks as described in #1441. They don't relate to user data submitted to Hangfire direc…
This version contains security fixes to prevent possible XSS attacks as described in #1441. They don't relate to user data submitted to Hangfire directly via method arguments, but it's recommended to upgrade anyway. If you are using Hangfire 1.7, please upgrade to version 1.7.3 instead.
<dl> <dt>Affected Packages</dt><dd>Hangfire.Core ≤ 1.6.25, 1.7.0, 1.7.1, 1.7.2</dd> <dt>Affected Platforms</dt><dd>All, including .NET Core, .NET Framework, Mono of any version</dd> </dl>
Steps to reproduce
public static void Xss()
{
BackgroundJob.Enqueue(() => Xss2());
}
public static void Xss2()
{
throw new Exception("<script>alert(1);</script>");
}
Hangfire.Core
HtmlEncode in all remaining places in Dashboard UI to prevent XSS attacks.Fixed – Buggy CancellationToken consumers now can't cause memory leaks related to token registrations.
Hangfire.Core
CancellationToken consumers now can't cause memory leaks related to token registrations.Fixed – PreserveCulture filter logs a message instead of throwing an error when it can't find the culture.
Hangfire.Core
PreserveCulture filter logs a message instead of throwing an error when it can't find the culture.Hangfire.SqlServer
JobExpirationCheckInterval option to avoid exceptions in runtime (PR #1377 by @carlowahlstedt).Added – Slow log to see warning messages when filters or queries take more than 1 minute.
Hangfire.Core
DistributedLockTimeoutException based on resource name in schedulers (PR #1370 by @bogdandanielb).NullReferenceException on Recurring Jobs page.Hangfire.AspNetCore
Microsoft.***.FormattedLogValues in ASP.NET Core 3.0.Hangfire.SqlServer
GetRangeFromSet to be forward compatible with the 1.7.0 schema.Added – Ability to use custom type resolvers to modify the type de-serialization logic.
Hangfire.Core
JobLoadException when processing jobs in .NET Framework, which were created in .NET Core.JobLoadException when jobs reside in a signed assembly and a new version is deployed.Hangfire.SqlServer
SqlServerStorage class (#1325 by @chinwobble).This is a maintenance release with minor changes.
This is a maintenance release with minor changes.
Hangfire.Core
RecurringJobScheduler may block server shutdown and cause distributed lock to be abandoned.Hangfire.SqlServer
Connection.SetRangeInHash method to avoid deadlocks.Hangfire.AspNetCore
IAntiforgery interface doesn't lead to an exception.This release contains fixes for security issues related to dashboard, so it is highly recommended to upgrade. Cross-Site Request Forgery_Prevention_Ch
This release contains fixes for security issues related to dashboard, so it is highly recommended to upgrade. Cross-Site Request Forgery protection was added by using existing libraries, but methods are different across application frameworks:
Microsoft.AspNetCore.Antiforgery package is used to generate and validate tokens. Dependency injection is used to obtain the implementation and apply it when available.IOwinDashboardAntiforgery interface, because the available implementation is tightly coupled with the System.Web.Helpers assembly. Please check this gist to learn how to enable antiforgery token validation on ASP.NET and ASP.NET MVC platforms.Other important updates include a new retry implementation for state changes in the Worker class to avoid any reads and writes whenever it is possible for a job's distributed lock to be abandoned, because it may lead to consistency issues. Transitions directly to the Failed state without applying the job filters were also disabled, because such a behavior is not a determined one.
Also, looks like waiting on CancellationToken.WaitHandle rarely leads to high CPU usage. I was unable to reveal the exact reason for this, but any other implementation, including using Task.Delay or own tandem of CancellationToken.Register with ManualResetEvent works fine without such issues.
Hangfire.Core
SECURITY – Add "robots" meta tag to ensure browser don't index dashboard pages.
SECURITY – Add support for antiforgery validation to prevent CSRF attacks (requires configuration).
Fixed – Perform state change retries using a fresh connection when job's distributed lock may be abandoned
Fixed – Disallow transitions to the Failed state on retries that bypass all the filters
Fixed – Remove possible rare CPU spikes due to the use of CancellationToken.WaitHandle
Fixed – Avoid resolving types and methods for logging in static constructors that may lead to process shutdown
Fixed – Prevent Recurring jobs dashboard from throwing NullReferenceException (#1203 by @mattkwiecien)
Fixed – Replace wall clocks with monotonic ones when calculating local timeouts
Fixed – Change logger initialization to be deterministic and predictable by using instance fields
Fixed – Make _currentLogProvider field access to use volatile reads/writes
Fixed – Typo in NotSupportedException's message (#1210 by @benrick)
Fixed – Typo on the Failed jobs page (#1207 by @gareth-evans)
Hangfire.SqlServer
Hangfire.AspNetCore
Fixed – NullReferenceException in JobMethodCallRenderer regression appeared in 1.6.18.
Hangfire.Core
NullReferenceException in JobMethodCallRenderer regression appeared in 1.6.18.Hangfire.SqlServer
SqlCommandBatch disposable to dispose all the commands.This release contains a lot of fixes, but the most important ones are related to .NET Core and ASP.NET Core frameworks. Filters based on attributes ar
This release contains a lot of fixes, but the most important ones are related to .NET Core and ASP.NET Core frameworks. Filters based on attributes are now working fine there, and DisplayName decoration will finally bring the human-ready name for your jobs. Other fixes are mostly related to dashboard.
Hangfire.Core
Hangfire.AspNetCore
Hangfire.SqlServer
Added – SqlServerStorageOptions.CommandBatchMaxTimeout parameter to enable batching in transactions.
Hangfire.SqlServer
SqlServerStorageOptions.CommandBatchMaxTimeout parameter to enable batching in transactions.This is yet another maintenance release that fixes a bunch of non-critical bugs in Hangfire.Core and Hangfire.SqlServer packages.
This is yet another maintenance release that fixes a bunch of non-critical bugs in Hangfire.Core and Hangfire.SqlServer packages.
Hangfire.Core
DateTime and DateTime? serialization issues in background job arguments (#971 by @plaisted, #970, #972).DistributedLockTimeoutException in some background processes now logged with "DEBUG" level instead of "ERROR" (#789).ElmahLogProvider to show errors when using SQL log (#867 by @francnuec).Hangfire.SqlServer assembly doesn't include version in the netstandard target (#951).Hangfire.SqlServer
SqlConnection instance.KeyNotFoundException errors on various dashboard pages don't appear anymore (#948 by @benjymous, #945, #946).This release contains important fixes for the Hangfire.SqlServer package, which is actively using the `sp_getapplock` stored procedure to synchronize
This release contains important fixes for the Hangfire.SqlServer package, which is actively using the sp_getapplock stored procedure to synchronize work between different servers. I've realized that locks shouldn't be awaited on SQL Server's side, because this may lead to SQL Server's connection pool starvation, because each blocked request will block a single worker thread.
When you are using a lot of workers, and there's a contention on few lock resources (like when using the DisableConcurrentExecutionAttribute, batches or many continuations on a single job), all worker threads can be blocked in SQL Server, causing its unresponsiveness and lead to huge amount of timeout exceptions.
Hangfire.SqlServer
sp_getapplock (fbe756ee71ccb6bd20ee9f9167981d4574c773d4).This versions adds possibility to use non-transactional message fetching algorithm when using Hangfire.SqlServer package. This is especially helpful,
This versions adds possibility to use non-transactional message fetching algorithm when using Hangfire.SqlServer package. This is especially helpful, if you have a lot of long-running background jobs, since they may prevent you from taking transaction log backups, leading to the Transaction log is full due to 'ACTIVE_TRANSACTION' error.
The new implementation is based on the old invisibility timeout, but workers are now periodically renewing that timeout, so you can forget about setting too high timeout just to allow your long-running background jobs to run smoothly. Non-transactional fetch is not enabled by default in this version (and will not be in 1.7.0 to preserve backward compatibility), to configure it please use the SlidingInvisibilityTimeout option as written below.
Lower values will stress your database (for example, if it is set to 5 minutes, each worker will run a keep-alive query each minute when processing a job), higher values will add a corresponding delay, when processing is terminated ungracefully.
GlobalConfiguration.Configuration.UseSqlServerStorage(
"connection_string",
new SqlServerStorageOptions { SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5) });
Hangfire.SqlServer
SqlServerStorageOptions.SlidingInvisibilityTimeout to fetch jobs without using transaction.SlidingInvisibilityTimeout option).SqlServerJobQueueMonitoringApi can't cause READ UNCOMMITTED isolation level to leak on SQL Server 2012 or earlier.SqlServerStorage(DbConnection, SqlServerStorageOptions) constructor.This release contains a bunch of fixes for core and integration packages. The most important updates are fix for SQL connection leaks when we failed t
This release contains a bunch of fixes for core and integration packages. The most important updates are fix for SQL connection leaks when we failed to acquire a distributed lock, and wrong queue selection, when continuation is created after antecedent job is finished. So upgrade is recommended.
Hangfire.Core
AutomaticRetryAttribute.NullReferenceException, when state has changed during query on Processing page.CreateBatchFailedException, when batch creation takes longer than 1 hour.Hangfire.AspNetCore
GetServiceOrCreateInstance method (by @Tsabo).Hangfire.SqlServer
SqlServerDistributedLock leaks connections, when lock acquisition is failed.KeyNotFoundException when accessing Deleted Jobs page in Dashboard.This release brings better exception handling policy for state changing pipeline. Previously, non-transient exception in a state filter could cause a
This release brings better exception handling policy for state changing pipeline. Previously, non-transient exception in a state filter could cause a worker to perform retries for affected background job infinitely. And a large number of such background jobs could stall the processing.
The new logic makes 10 attempts to perform a state change using state filters. When all the attempts failed, it moves background job to the Failed state without calling any state filters.
Hangfire.Core
This release fixes a problem with CSS and JS files in dashboard appeared in 1.6.10, as well as corrects the authorization behavior, when the User prop
This release fixes a problem with CSS and JS files in dashboard appeared in 1.6.10, as well as corrects the authorization behavior, when the User property is null.
Hangfire.Core
NullReferenceException in dashboard when OWIN's or ASP.NET Core's User is null.This is a maintenance release that contains fixes for job continuations and some dashboard issues related to Content Security Policy and recurring job
This is a maintenance release that contains fixes for job continuations and some dashboard issues related to Content Security Policy and recurring jobs page. It's highly recommended to upgrade to prevent problems with continuations. They are rare, but lead to significant headache.
Hangfire.Core
ArgumentException: the same key already added.This is a small correcting release that make it possible to have a workaround for TimeoutException exceptions when using SQL Server with huge argument
This is a small correcting release that make it possible to have a workaround for TimeoutException exceptions when using SQL Server with huge arguments or batches. The SqlServerOptions.CommandTimeout option was added to allow to override the default timeout of 30 seconds.
Fixed – TimeoutException on large arguments or large batches via SqlServerOptions.CommandTimeout.
This release contains a bunch of minor fixes, mostly for Dashboard UI.
This release contains a bunch of minor fixes, mostly for Dashboard UI.
Hangfire.Core
Cron.MonthInterval now returns correct CRON expression.NotSupportedException early, when arguments contain delegate or expression.RecurringJobScheduler.Hangfire.SqlServer
long where possible instead of int for background job identifiers, full support will be in 1.7.0 (#749).This is a correcting release that brings fixes to fully support generic methods, whose generic arguments are defined in their parameters, including Li
This is a correcting release that brings fixes to fully support generic methods, whose generic arguments are defined in their parameters, including List<T> and T[]. A lot of issues with Dashboard UI that cause exceptions and other errors, like uncontrolled growth of event listeners on resize, were also fixed. Please see the full delails below.
Hangfire.Core
ArgumentException when using complex arguments in generic methods like IList<T> (#719 by @aidmsu).T[] aren't supported in background job arguments (#740 by @aidmsu).HtmlHelper.ToHumanDuration incorrectly formats fractional seconds (#708 by @pieceofsummer).RecurringJobDto (#737 by @swordfish6975).Hangfire.SqlServer
Hangfire.AspNetCore
AspNetCoreJobActivator.BeginScope method now returns a correct instance (#706, #709 by @pieceofsummer).This is a correcting release that fixes a regression, when using generic methods of a scoped variable in expression when creating a background job, as
This is a correcting release that fixes a regression, when using generic methods of a scoped variable in expression when creating a background job, as well as some minor optimizations for SQL Server. It also adds CLS compliance for basic packages, since public API is already compliant.
Hangfire.Core
Hangfire.Core, Hangfire.SqlServer and Hangfire.SqlServer.Msmq marked as CLS-compliant.ArgumentNullException when scoped variable is used in expression.Hangfire.SqlServer
SqlServerJobQueue class doesn't use obsolete InvisibilityTimeout parameter anymore.This correcting release contains a lot of stability improvements for Hangfire.SqlServer, especially for SQL Azure Database environments. Processing is
This correcting release contains a lot of stability improvements for Hangfire.SqlServer, especially for SQL Azure Database environments. Processing is now more predictable even in Basic pricing tier, there is a special harness application that's running 24/7 to ensure everything is fine. Some problems related to I18N, authorisation and continuations were also fixed.
Hangfire.Core
TypeNameHandling.All option is used (#666, #674 by @MaksimSimkin).Newtonsoft.Json.Hangfire.SqlServer
ExpirationManager is bloated by SqlError instances, when there are a lot of messages from server.CountersAggregator executions.NOLOCK hint for monitoring queries when using SqlServer-based queues.ExpirationManager is forced to use index seek operations for cascade deletions.CountersAggregator now uses clustered index scan to issue less logical reads.This release fixes a problem that caused SqlConnection instance to leak when nested distributed locks are acquired for the same resource. If you are u
This release fixes a problem that caused SqlConnection instance to leak when nested distributed locks are acquired for the same resource. If you are using batches, or continuations, and SQL Server as a storage, it is highly recommended to upgrade to prevent connection pool starvation and timeout exceptions.
Hangfire.SqlServer
SqlConnection object leaks when using nested distributed locks (in batches and continuations).This is a maintenance release that contains fixes for several bugs. It is highly recommended to upgrade to this version, if you are using Hangfire.Sql
This is a maintenance release that contains fixes for several bugs. It is highly recommended to upgrade to this version, if you are using Hangfire.SqlServer.
Hangfire.Core
RecurringJob.AddOrUpdate method overloads to prevent CS4014 warnings.ToGenericTypeString method now handles types with no namespace correctly.Hangfire.SqlServer
ExpirationManager's command from timing out, when there are a lot of records.CountersAggregator issue introduced in 1.6.2, that causes slow record aggregation.XLOCK hint for CountersAggregator query to prevent deadlocks on lock escalation.Hangfire.SqlServer.Msmq
Changed – Recurring job page displays now raw cron strings, descriptions are in tooltips (#596).
Hangfire.Core
Hangfire.SqlServer
JobExpirationCheckInterval property value now defaults to 30 minutes (#628).State and JobParameters tables (#628).Install.sql was deadlocked by itself, leading to errors on startup (#636).Hangfire.SqlServer.Msmq
Added – Automatic unit tests execution for .NET Core on Windows, Linux and OS X using AppVeyor and Travis CI.
Hangfire.Core
DateTime deserialization issues on .NET Core platform.TypeInitializationException when using Serilog appeared in version 1.6.0 (#606).NullReference on Job Details page when background job has null value for IEnumerable argument (#566).Hangfire.AspNetCore
GetHttpContext extension method for the .NET Core platform (#613).Added – .NET Core support for Hangfire.Core and Hangfire.SqlServer packages (netstandard1.3 target, #604).
Hangfire.Core
netstandard1.3 target, #604).JobActivator.BeginScope method (#523).BackgroundJobServer.SendStop method, that requests for a shutdown.BackgroundJobServerOptions.ServerName option is back.IDashboardAuthorizationFilter interface that makes IAuthorizationFilter obsolete.Cron class (#174 by @geirsagberg).IRecurringJobManager interface for the RecurringJobManager class (#491 by @arnoldasgudas).ToGenericTypeString method now supports nested classes (#522 by @patrykpiotrmarek).Hangfire.AspNetCore
Hangfire.SqlServer
netstandard1.3 target, #604).SqlServerStorage class constructor now takes DbConnection instances (#539 by @tystol).SqlServerObjectsInstaller class is public now (#485 by @vbfox).Hangfire.SqlServer.Msmq
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.