Questions tagged [hangfire]

Hangfire is an open-source framework that helps you to create, process and manage your background jobs in .NET Framework and .NET Core.

Hangfire is an open-source framework that helps you to create, process and manage your background jobs in .NET Framework and .NET Core.:

  • mass notifications/newsletter
  • batch import from xml, csv, json
  • creation of archives
  • firing off web hooks
  • deleting users
  • building different graphs
  • image/video processing
  • purge temporary files
  • recurring automated reports
  • database maintenance

Background job type support:

  • Single use
  • Delayed
  • Recurring
  • Continuations

Persistent Storage via SQLServer, Redis, PostgreSQL, mongoDB or CompositeC1.

Hangfire is a .NET Framework alternative to Sidekiq, Resque, and delayed_job.

http://hangfire.io/

1297 questions
9
votes
0 answers

send SignalR client message from background thread

I'm trying to track the progress of my Hangfire background jobs guided by article http://docs.hangfire.io/en/latest/background-processing/tracking-progress.html Unfortunately the example given in the article is not working. I downloaded and run the…
landless
  • 133
  • 2
  • 8
9
votes
3 answers

HangFire delayed tasks with date

How can I add date to the HangFire task? For example, this code adds 7 days: BackgroundJob.Schedule( () => Console.WriteLine("Reliable!"), TimeSpan.FromDays(7)); But what if I need to run task in specific date?
Dana Bek
  • 113
  • 2
  • 7
8
votes
1 answer

Hangfire: add JobId globally for logging to Serilog

I am trying to add the Hangfire JobId (and other properties) to all of my jobs without having to add it to each job method. In Startup.cs I added a promising filter solution however I don't know how to apply it to my test method and I am not even…
ratanmalko
  • 449
  • 4
  • 20
8
votes
1 answer

Hangfire run background job with user context

I have an app, with multi-tenancy. I want to create background job under user context, but I can't find good way to implement that. I'll explain a bit my architecture. I'm using Interface ICurrentUser that contain UserID. In Startup class I…
grinay
  • 709
  • 1
  • 6
  • 21
8
votes
4 answers

How to disable requeue jobs on Hangfire dashboard

Currently the Hangfire dashboard offers an option to requeue jobs (either succeed or failed) and in my case running twice a job can cause problems. I have tried to add AutomaticRetry attribute... [AutomaticRetry(Attempts = 0)] Which solves the…
agascon
  • 718
  • 1
  • 6
  • 25
8
votes
4 answers

.Net framework to manage background running processess on seperate machines

I am having an asp.mvc application which resides on a server.From this application, I want to start a process which is a bit long-running operation and will be resource intensive operation. So what I want to do is I want to have some user agent like…
I Love Stackoverflow
  • 6,738
  • 20
  • 97
  • 216
8
votes
0 answers

Recycle of App Pool kills Kestrel but does not restart

Background When hosting a (non-Core) ASP.net site on IIS 8+ it is possible to utilize the IIS Application Initialization Module to pro-actively initialize ('warm-up') a web application when IIS starts up (or, I believe, when an app pool is…
8
votes
1 answer

Use multiple instance of hangfire with single database

Has anyone used multiple instances of Hangfire (in different applications) with same SQL DB for configuration. So instead of creating new SQL DB for each hangfire instance i would like to share same DB with multiple instances. As per the hangfire…
LP13
  • 30,567
  • 53
  • 217
  • 400
8
votes
1 answer

Hangfire does not process recurring jobs unless dashboard is open

When I log into the server and open dashboard, it shows recurring jobs with the next execution in the past. Within seconds it triggers processes them automatically, but if I don't log in and open the dashboard, the recurring jobs are not triggered.…
8
votes
3 answers

HangFire dashboard not displaying in PROD

I am using HangFire to schedule jobs but when I deployed to PROD, the website/hangfire url is not working. I am getting The system cannot find the file specified error. On localhost, I am able to open the URL. I followed this URL:…
mpora
  • 1,411
  • 5
  • 24
  • 65
8
votes
2 answers

Log hangfire events using existing serilog

Im new to hangfire, and im trying to setup a way to log the events using my existing serilog logger in an asp.net web api. Here is my logger class: public static class LoggerInitializer { private static ILogger CreateLog() { var…
Jonas Olesen
  • 568
  • 5
  • 25
8
votes
3 answers

hangfire Could not load file or assembly 'DynamicProxyGenAssembly2

I have setup Hangfire as below: var t = IocManager.Resolve(); RecurringJob.AddOrUpdate("sendDailyEmail",() => t.sendEmail(), Cron.Daily); When I access the Hangfire dashboard, I can see the Recurring Jobs 1, but the job is not executed…
Arash
  • 3,458
  • 7
  • 32
  • 50
8
votes
1 answer

Using Hangfire: generic Enqueue method throws exception

I've got a simple .NET 4.5 console app with Hangfire.Core and Hangfire.SqlServer packages installed. In my main method I enqueue a background job like this: BackgroundJob.Enqueue((t) => Console.WriteLine(t.Sum(3,4))); My Test class looks like…
Daniel Vygolov
  • 884
  • 2
  • 13
  • 26
8
votes
1 answer

SQL Server log file grew 40GB with Hangfire

I have developed an Hangfire application using MVC running in IIS, and it is working absolutely fine, till I saw the size of my SQL Server log file, which grew whopping 40 GB overnight!! As per information from our DBA, there was an long running…
Yogi
  • 9,174
  • 2
  • 46
  • 61
8
votes
6 answers

Hangfire dashboard returns 404

When trying to access the hangfire dashboard on my local IIS at domain/hangfire/ I get a 404 response. This is in a webforms project targeting .Net 4.5.1, Hangfire is version 1.5.3. My startup and authorisationoverride classes are as…
Jason
  • 3,599
  • 10
  • 37
  • 52