public bool StopJob(int jobId) { var job = _context.Jobs.FirstOrDefault(m => m.Id == jobId); if (job == null) { return(false); } _processor.StopJob(job.JobProcessorReference); Hangfire.RecurringJob.RemoveIfExists("jobstatus_" + job.Id); return(true); }