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

Viewed 10127

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?

2 Answers
Related