As explained in How to identify jobs that are being cancelled? cancellation of a job might take some time. It should be visible to users, when a job is being cacelled.
Any update on this feature request? Would be very useful for I as well.
Unfortunately not. But I’m glad to see that I’m not the only one.
I noticed the developer has mentioned Hangfire should be customization enough to implement custom states. I am trying to come up with something but nothing notable yet…
IMHO, a cancelling state is something that needs to be built into the system. No customization will help here because if that event is not a part of the event pipeline, it isn’t.
I have the scenario, when based on specific condition, a given background job cannot be run again from UI. The OnPerforming
handler is checking the condition and the job might be cancelled. I need to inform the user, why it is cancelled, but I cannot see an easy way to do this.