0

I ran into a strange problem. I used Hang Fire in a software under Blazor Server and .NET Core that I had no problem with, and now I have come across this problem that when I request to create any job, I see a bunch of jobs that I don't know where they come from, but they are related to the software. They are in Queue!

For testing, I completely changed the database and created a new database and also copied the Hangfire tables to be created again, but I was surprised to see that the same job was created and inside the Hangfire dashboard and a dashboard based on the same I created it manually, they can be seen. Thank you for knowing the solution to this issue. Or at least something I noticed is that the information is not in the database. If they are not in the database, where are they stored?

  • Delete those Job's Manually from `Recurring Jobs` that will resolve Your issue. – Upender Reddy Jul 11 '23 at 06:49
  • They are stored in code somewhere then. Check for the job registration in code https://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html – sommmen Jul 11 '23 at 06:53
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jul 11 '23 at 12:51

1 Answers1

0

May be You are imported table with data so those Job name's already exit's in that table. No need to create table's manually Hangfire will automatically create those table's not exist in that data base. Delete them Manually from Recurring Jobs Tab. To Delete them from Code Level follow below line.

RecurringJob.RemoveIfExists("Test Job");
Upender Reddy
  • 568
  • 3
  • 8