Cancel a job in retry state before it runs

Hi, is it possible to cancel a job in retry state after it failed? There are some cases where I need to cancel it and I need to do it using hangfire API to prevent it retrying again.

Thanks