Questions tagged [hangfire-sql]
63 questions
0
votes
1 answer
How to postpone a delayed job in Hangfire using SQL script
We have been using Hangfire v.7 with SQL Server for a long time and have a lot of delayed jobs. I want to find those scheduled to run in a specific period (e.g. from 2030-01-01T01:00:00 to 2030-01-01T03:00:00) and postpone them for N hours. I assume…

thirdDeveloper
- 855
- 1
- 10
- 30
0
votes
1 answer
Hangfire server in .Net Worker Service
I am trying to start Hangfire server in .Net Worker Service using example:
Configure Hangfire dashboard in a worker service in .Net 5? answer by Ruslan Gilmutdinov https://stackoverflow.com/users/1734655/ruslan-gilmutdinov but following code
using…

Vasil Ivanishvili
- 37
- 5
0
votes
1 answer
Hangfire unable Enqueue job - SQL exception
I have hangfire implemented on my API and I'm using SQL Server with it. It has worked in each environment until I released it to production. All my jobs are just sitting as "Enqueued" and aren't starting at all. I've looked and there are servers…

user2661305
- 311
- 1
- 4
- 16
0
votes
1 answer
Static Hangfire RecurringJob methods in LINQPad are not behaving
I have a script in LINQPad that looks like this:
var serverMode = EnvironmentType.EWPROD;
var jobToSchedule = JobType.ABC;
var hangfireCs = GetConnectionString(serverMode);
JobStorage.Current = new SqlServerStorage(hangfireCs);
Action

Terry
- 2,148
- 2
- 32
- 53
0
votes
1 answer
HangFire migration from service
In my application (C# api dotnet 5 modified to run as windows service) I use HangFire. When running my application in debug mode from Visual Studio, all works fine, and my database is being created including HangFire tables when I invoke…

Hans-Henrik Møller
- 137
- 2
- 11
0
votes
0 answers
Make Hangfire as Multi-Tenant
I am trying to create a scheduler using the library Hangfire. Created an ASP.NET Core API project added NuGet packages. (Using SQLServer for storage)
Added this code to set the server and storage
public void ConfigureServices(IServiceCollection…

techrhl
- 434
- 8
- 19
0
votes
0 answers
Hangfire recurring job throws error after 1-2 times
In a .NET Core(2.1) application, it uses Hangfire library(1.7.24) to schedule a recurring job. It uses SQL server as storage for Hangfire. The recurring job works 1-2 times then it throws error. So trying to handle the error means if any error…

Manas Kumar
- 2,411
- 3
- 16
- 23
0
votes
2 answers
Hangfire and ASP.NET Core's service locator not resolving the AppDbContext
I'm trying to use Hangfire in an ASP.NET Core 5 web application. I'm using dependency injection to pass in various dependencies to a hangfire task that will run every minute. Unfortunately, when I attempt to execute a query using entity framework…

tnk479
- 672
- 11
- 26
0
votes
1 answer
Hang fire background jobs gives SQL exception : Login Failed
Tutorial I followed - https://docs.hangfire.io/en/latest/getting-started/aspnet-core-applications.html
Configure services in startup class
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IBackgroundJobClient…

Thilina Madushan
- 111
- 1
- 7
0
votes
0 answers
Why would a hangfire job run on more than one server?
Why would our job run on multiple servers? We are using v 1.7.6 and the Job is launching on more than 1 server. Here is our configuration:
services.AddHangfire(configuration => configuration
…

PilotBob
- 3,107
- 7
- 35
- 52
0
votes
1 answer
Hangfire recurring jobs - how to dynamically change the interval
I have a .NET web application which uses Hangfire for some recurring jobs. I want to build the functionality so that the users can change the interval of the jobs through the application. But it seems the 'update' doesn't work.
I have configured the…

Grace
- 33
- 1
- 7
0
votes
0 answers
The scheduled job hasn't been executed automatically
I'm using Hangfire 1.7.11 and this filter, but I changed the fingerprint format to use a SHA256Hash instead.
protected static string GetFingerprint(Job job)
{
string parameters = string.Empty;
if (job.Args != null)
{
parameters =…

Gus
- 856
- 1
- 8
- 24
0
votes
0 answers
Hangfire Recurring Job working Intermittently
I have an API that's using .Net Framework 4.7, Hangfire (v1.7.11). I have the Recurring Job to run daily at 3am using cron expression "0 3 * * *". But the Recurring Job is running Intermittently and shows the Next Execution as past "Next Execution -…

Sai Krishna
- 55
- 1
- 8
0
votes
1 answer
How to setup auto delete of successful jobs in Hangfire (Postgresql)
I have couple of jobs scheduled to run every 5 mins in Hangfire backed by PostgreSql. I see that when SQL server is used the successful jobs are automatically deleted from DB. I don't find anything similar in PostGreStorageOptions. Any idea how to…

jayasurya_j
- 1,519
- 1
- 15
- 22
0
votes
0 answers
Why Hangfire doesn't process recurring jobs in parallel?
I have 30 recurring jobs. Every job just writes it's id in console, does nothing more. Every job is programmed to recurrently run every second.
SchedulePollingInterval = new TimeSpan(0, 0, 1)
WorkerCount = 100
According to the log in console every…

Michael Chudinov
- 2,620
- 28
- 43