I use Hangfire for running a set of recurrent jobs. Sometimes I wanted to rename these jobs. However, it is not clear how to do that.
E.g. I have the code:
RecurringJob.AddOrUpdate("Old Name", () => SomeJob(), "Cron");
If I wanted to rename it I have to do the following:
RecurringJob.RemoveIfExists("Old Name");
RecurringJob.AddOrUpdate("New Name", () => SomeJob(), "Cron");
but in this case, the history of jobs will be lost.
Maybe there is a better way to rename the job?