Hangfire create schedule and I didn't created it

Hello Everybody,

I created recurring jobs at specific time and it runs good, but when the project starting I found the hangfire create schedule task for the recurring jobs that I had created. and the scheduled task runs every seconds or 1 min that make the function run before the specific time that I had added for recurring job.

Thanks

Hi Ahmed,
You haven’t provided much information here but I’m going to guess that maybe you are getting two or more recurring jobs after a restart? If you are using non-volatile storage (e.g. SQL Server) the definition of the recurring task remains in the database and is restarted automatically. I always clear any existing scheduled instances of a job when I go through startup:
RecurringJob.RemoveIfExists(“processName”);
Then any previous instances are removed before you schedule a new one.
Will