Search code examples
c#hangfire

How can I check if a job exists in Hangfire before I delete it?


Hangfire hangs if you try and delete a job that doesn't exist, i.e if jobId isn't in Hangfire.Job

BackgroundJob.Delete(jobId);

Is there any way of checking if a job exists before trying to delete it?


Solution

  • There is no need to do this anymore, as the bug causing Hangfire to hang has been fixed.