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
-1
votes
1 answer

For Hangfire, is there any sample code for non-simple tasks; and how should recurring tasks be handled when re-publishing?

I am considering using Hangfire https://www.hangfire.io to replace an older home-grown scheduling ASP.NET web site/app. I have created a simple test project using Hangfire. I am able to start the project with Hangfire, submit (in code) a couple of…
PhilipD
  • 419
  • 6
  • 13
-1
votes
1 answer

Hanfire skips first job execution

So I'm using Hangfire schedule jobs that send out reminders to users. Whenever I set the Job to run every monday for example at 14h00. If I do this in the morning say at 09h00. The first execution, should go off at 14h00. Problem is what seems to be…
Mbuso Mkhize
  • 89
  • 1
  • 4
-1
votes
2 answers

Parallel task in Hangfire Recurring Job

I need to run parallel tasks inside of an recurring job fired every minute by Hangfire. Tried Task Factory which starts the task but never waits for the actual execution to complete. Parallel Foreach also does the same.
-1
votes
1 answer

ASP .NET Core Logout User after x time or at specific time

I have tried using Hangfire to create a recurring job to run at 3 specific hours daily but i found out later it cannot access httpcontext to signout users, so what i did instead, hangfire task calls a stored procedure at the given hours and I have…
Jackal
  • 3,359
  • 4
  • 33
  • 78
-1
votes
1 answer

how to fix `MySql.Data.MySqlClient.MySqlException: 'Unknown column 'Key' in 'field list''` error in asp.net core and mysql hangfire problem?

i have create a cron job with asp.net core and mysql and hangfire, but when i run my project that got me an error like this the customset table doesn't exists so i have created a table called customset and rerun the project but that got me again an…
bagher
  • 11
  • 1
  • 2
-1
votes
1 answer

DbContext instance is used twice at the same time

I saw similar problems on the internet, but couldn't really fit any of them to my code. I'm running two hangfire jobs and sometimes they have to run at the same time.…
Guga Todua
  • 462
  • 2
  • 11
  • 27
-1
votes
1 answer

Hangfire - get next execution time

I have a reccuring job in Hangfire which is triggered by CronTemplate. I need to get next execution time during the job execution. I came up with an idea to inject CronTemplate into the job and calculate that date using some of existing libraries…
Alex Riabov
  • 8,655
  • 5
  • 47
  • 48
-1
votes
1 answer

How do Hangfire's short polling intervals harm SQL Server?

In Hangfire's documentation, there's a mention of polling interval (when using SQL Server as the storage): You can adjust the polling interval, but, as always, lower intervals can harm your SQL Server, and higher interval produce too much latency,…
Tom Pažourek
  • 9,582
  • 8
  • 66
  • 107
-1
votes
1 answer

Starting async/await from any arbitrary (synchronous) method

If I have a regular method call and I need to 'start' using async/await, what is best way to initiate that? Without going into too much detail, I'm using Hangfire to process jobs and due to some scenarios that I think are outside scope of the…
Terry
  • 2,148
  • 2
  • 32
  • 53
-2
votes
1 answer

Mock HttpContext.Current in HangFire

HttpContext.Current is null when fire job in Hang Fire!! because i want to use await UserManager.FindAsync(); should inject HttpContext.Current to HangFire or not and How??
-2
votes
1 answer

What the first one means in hangfire recurringjobs?

In Hangfire Recurring Jobs: HangfirePeriodicBackgroundWorkerAdapter.DoWorkAsync What the first one means? Can I delete it? It seems to be executed every five seconds? Will it consume too much resources? Thanks very match!
liquehuo
  • 3
  • 2
-2
votes
1 answer

DI service state when executed inside hangFire job

Help! When we put an expression in a hangFire job, and for example, in this expression we use some services (DI services that work with database) When doing a hangFire job, are these services snapshots of the state at the time the job was…
Tim
  • 3
  • 1
-2
votes
1 answer

I need CRON expression for every 90 seconds (1min. 30 sec). Is it possible?

I need to run my recurring job for every 90 seconds (1min. 30 seconds). What is the CRON expression for this. Is it possible to do this? The below code is scheduled my job in every 2 minutes. But i want to schedule for every 90 seconds (1min. 30…
-2
votes
1 answer

Hangfire automatically starting all recurring jobs after prod deployment

I encountered a serious problem with Hangfire in production, which is happening occasionally but is quite concerning. I am using Hangfire with .Net Core 2.1 After deploying my Hangfire job, all of my recurring jobs are started automatically which is…
Billy
  • 1
  • 1
-2
votes
1 answer

Is SignalR overkill for simple notifications on async tasks?

The current .NET MVC 5 web app includes a button somewhere which calls into a controller method which generates an SSRS report and then emails that to some recipients (with the proper layers but it's still one request). After labeling this a…
devadviser
  • 120
  • 1
  • 12
1 2 3
86
87