I am launching a background recurring job using the following API
RecurringJob.AddOrUpdate( () => Cancelable( JobCancellationToken.Null), Cron.Minutely);
My goal is to stop all the processing and recurring jobs when the service is terminated. This
can be also done by selecting the “Delete” button in the dashboard.
For some reason, when I delete the task through dash board, the cancellationtoken is not
set to true . How do I capture the jobID or the processing or the recurring job?
I have used var recurring = connection.GetRecurringJobs().FirstOrDefault(p => p.Id == “HangFireService.Cancelable”);
How do we terminate processing jobs . Please let me know.
When I exit the service, is it sufficient that I just kill the recurring job and not the ones that are processing as I do not want any tasks hanging in the background . thanks