RecurringJob.RemoveIfExists

Tags: #<Tag:0x00007fafebd88bd0>

I am using this bit of code to remove jobs when my API is starting up.

using (var connection = JobStorage.Current.GetConnection())
{
foreach (var recurringJob in StorageConnectionExtensions.GetRecurringJobs(connection))
{
RecurringJob.RemoveIfExists(recurringJob.Id);
}
}

However when the line “RecurringJob.RemoveIfExists(recurringJob.Id);” is executed, the job actually fires and runs.

This does not seem correct.