I consider using Hangfire as a job scheduler for recurring jobs. So setting them up is simple with AddOrUpdate , but how can I remove it? I don't want to pollute my code with RecurringJob.RemoveIfExists() when this job was deleted, and then I need to remember it later.
Is there a way to get a list of all duplicate jobs and delete them when the server starts, and so my code will add them every time? If not, if there is a better way?
eg.
Application Version 1: Added new repetitive work Hangfire Do something 1
Application Version 2: Added new recurring jobs: Hangfire Do something 2 and Do Something 3
Application Version 3: Fixed re-run of Hangfire Do something 2
Problem: the task will still exist on the server with the error "Unable to load type ..." and it must be deleted.
source share