Any attempt to use RecurringJob.RemoveIfExists with throw an object reference not set exception if the job id doesn't exist in the underlying RavenDb storage.
The exception originates in the Hangfire.Raven.RavenWriteOnlyTransaction.RemoveFromSet method.
This behaviour is not consistent with other Hangfire storage implementations, they will remove the job if it exists and won't throw an exception if it doesn't. See the documentation at the following link:
Any attempt to use RecurringJob.RemoveIfExists with throw an object reference not set exception if the job id doesn't exist in the underlying RavenDb storage.
The exception originates in the Hangfire.Raven.RavenWriteOnlyTransaction.RemoveFromSet method.
This behaviour is not consistent with other Hangfire storage implementations, they will remove the job if it exists and won't throw an exception if it doesn't. See the documentation at the following link:
http://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html