HangFire 0.9 Released
07 Jun 2014 edit on githubRecurring jobs
This version brings incredibly easy method of scheduling and running recurring jobs inside ASP.NET applications. You need to call only a single line of code to perform this task:
RecurringJob.AddOrUpdate(() => Console.Write("Easy!"), Cron.Daily);
The Cron class provides different easy to use methods and overloads to set up recurring jobs on a minutely, hourly, weekly, monthly and yearly basis. It is also possible to use more complex CRON expressions, since the NCrontab library is being used to perform scheduling logic.
RecurringJob.AddOrUpdate(
() => Console.Write("Powerful!"),
"0 12 * */2");
HangFire will check the schedule each minute and enqueue recurring jobs as regular background jobs, so you receive all power of HangFire, including the full transparency, free of charge.
HangFire Monitor was also updated and allows you to see and manage your recurring jobs:

So, HangFire now supports all kinds of background jobs: fire-and-forget, delayed and recurring, and let you process them with ease!
Changes
- Added – Out-of-the-box support for running recurring jobs.
- Added –
SqlServerStoragenow also accepts connection string names. - Changed –
IBackgroundJobClientdoes not implement theIDisposableinterface anymore. - Changed –
IMonitoringApidoes not implement theIDisposableinterface anymore. - Changed – Improve
DateTimeresolution for job arguments by including milliseconds. - Changed – Removed deprecated
RetryAttributeclass. Please, useAutomaticRetryAttribute. - Fixed –
KeyNotFoundExceptionwhen accessing job cancellation token with Redis. - Fixed – Theoretical race condition that makes HangFire Server invisible from Monitor.
Upgrading
Version 0.9 brings some breaking changes. Please, do the following steps to perform the upgrade.
- Replace the
RetryAttributewithAutomaticRetryAttribute. - Remove the calls to
Disposemethod ofIBackgroundJobClientinterface (orBackgroundJobClientclass). - Remove the invocations of
IMonitoringApi.Disposemethod.
Comments