Questions tagged [hangfire-sql]

63 questions
6
votes
0 answers

Hangfire - Rescheduling Scheduled jobs

To reschedule scheduled jobs I am currently deleting the previous job and then scheduling a new one within a transaction so if the schedule fails it rolls back the delete: using (var transaction = new…
kimsagro
  • 15,513
  • 17
  • 54
  • 69
6
votes
1 answer

Hangfire recurring job stops after app pool gets recycle

I have ASP.NET Core API (v 2.2) running under IIS using Windows Hosting module that is shipped with .NET Core. I have configured Hangfire in startup.cs with couple of recurring jobs. The API's app pool periodically gets recycled because of…
LP13
  • 30,567
  • 53
  • 217
  • 400
5
votes
1 answer

How to use Hangfire in ASP.NET Core with Azure database and Active Directory Password authentication

We're trying our first use of Hangfire (v1.7.19) in an ASP.NET Core WebApi application (.NET 5). Previously they've all been old school ASP.NET, and have worked without issue. Hangfire packages used (per the Hangfire documentation) are…
5
votes
2 answers

Tips to avoid hangfire jobs to duplicate?

I am having a problem that some jobs on hangfire are been queued more than one time with the same parameters, the jobs are almost queued at the same time. I've tried to limit the numbers of workers for just one and then to decorate my method with…
aucls
  • 81
  • 2
  • 7
4
votes
1 answer

Trigger recurring Hangfire job from database script

I have a pretty complicated sql script which cleans up my database and will be run manually from time to time. Immediatelly after the script has run I have to start a recurring hangfire job which is usually executed only once per day. In order not…
marco birchler
  • 1,566
  • 2
  • 21
  • 45
4
votes
1 answer

Hangfire recurring job doesn't start immediately

I am using cron expression for creating a recurring job. I am creating expression to execute every half an hour on 3 days of a week . The execution is correct but the time it starts is not correct. Suppose the creation of job happens at 2 : 16 pm,…
user1400915
  • 1,933
  • 6
  • 29
  • 55
4
votes
1 answer

Can hang-fire throttle number of background jobs running in parallel

I have IO intensive method that i am running as background job using hangfire. public IHttpActionResult Request(int[] ids) { foreach(var id in ids) { BackgroundJob.Enqueue(x => x.DoWork(id)); } } So for each id i…
LP13
  • 30,567
  • 53
  • 217
  • 400
4
votes
1 answer

Hangfire does not log exception using configured Logger

As per the hangfire documentation Starting from Hangfire 1.3.0, you are not required to do anything, if your application already uses one of the following libraries through the reflection (so that Hangfire itself does not depend on any of …
LP13
  • 30,567
  • 53
  • 217
  • 400
3
votes
2 answers

Hangfire in single application on multiple physical servers

I am running hangfire in a single web application, my application is being run on 2 physical servers but hangfire is in 1 database. At the moment, i am generating a server for each queue, because each queue i need to run 1 worker at a time and they…
Gillardo
  • 9,518
  • 18
  • 73
  • 141
3
votes
2 answers

Hangfire running recurring jobs on different web servers

We have multiple web servers running our sites, with load balancers, so users are directed to different servers depending on the load. The code is the same for each instance on each server, and we have recurring jobs that are run. Obviously we dont…
Gillardo
  • 9,518
  • 18
  • 73
  • 141
3
votes
1 answer

Getting Arguments from Hangfire.Job table

I work with Microsoft SQL server and Hangfire. In HangFire.Job table I have an Arguments column that stores foreign keys. For me, my Arguments column looks like…
user237
  • 41
  • 3
3
votes
0 answers

Hangfire send emails after retry

We have couple of jobs which are set up with retry attempt of 10. Due to nature or external service sometimes during 1st or 2nd time process will fail and we get failure email. But on 3rd or 4th time job will succeeded. Now I want to send email in…
user2757350
  • 311
  • 3
  • 12
3
votes
1 answer

How to configure Hangfire with Mysql storage

I have a web app that I developed using ASP.NET CORE and I want to send weekly newsletters to my customers. After looking around, I thought Hangfire will be a good tool for me to use. Unfortunately, I can't seem to get it to work using Mysql…
2
votes
1 answer

Getting Hangfire to work in a Windows Service using .NET 4.6.1

For a project I'm converting an existing console to a Windows Service. The current console application runs a series of jobs consecutively. The idea of the service is to run each of these jobs on a schedule. To do this we've created a windows…
Fysicus
  • 183
  • 2
  • 14
2
votes
0 answers

Is it safe to store data in the Hangfire Hash table?

How long does data in the Hash table persist for? I am redeveloping a notification system to use Hangfire to store scheduling rules and perform the Send. Is it safe for me to store a client identifier in the Hash table and query later?
Braydie
  • 716
  • 9
  • 27
1
2 3 4 5