I have a server with Hangfire installed. I haven\'t checked it for a while and it seems one recurring job has gone rogue. It stopped working and then it has stacked up with
I've seen a pretty interesting solution here
TRUNCATE TABLE [HangFire].[AggregatedCounter]
TRUNCATE TABLE [HangFire].[Counter]
TRUNCATE TABLE [HangFire].[JobParameter]
TRUNCATE TABLE [HangFire].[JobQueue]
TRUNCATE TABLE [HangFire].[List]
TRUNCATE TABLE [HangFire].[State]
DELETE FROM [HangFire].[Job]
DBCC CHECKIDENT ('[HangFire].[Job]', reseed, 0)
UPDATE [HangFire].[Hash] SET Value = 1 WHERE Field = 'LastJobId'
This basically truncates all the tables and resets the seeding for the Job table (reseting job id's)
I think it's also worth mentioning that it is good and sensible practice to stop your application and make sure the worker processes have cleared up on your server before running any scripts