Hi Support, I am started to use Hangfire library in few of my projects. I pretty much make use of queuing background job with msmq. However, there is a requirement in my project to cancel the current running background job. I read about using of cancellation token in the background method. When I add the IJobCancellationToken as param in method and calls cancellationToken.ThrowIfCancellationRequested() and click on the delete button in Hangfire dashboard to cancel processing job, apparently it does not cancel the job in my asp.net web api project. I can still see one message in my private queue and it still hits the breakpoints after deleting the job from the dashboard. Is there any step that I missing ? Thanks.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Unable to cancel whole Hangfire Cancellation process | 0 | 1352 | October 19, 2015 | |
Cancel a running job | 11 | 46677 | December 12, 2023 | |
IJobCancellationToken and CancellationToken clarification | 2 | 3827 | December 24, 2018 | |
Newbie; How to get list of currently processing jobs and stop one | 2 | 9589 | March 31, 2022 | |
Stopping a job from dashboard | 0 | 1103 | October 6, 2021 |