Example #1
0
        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);
        }