Deployment Running Recurring task unexpectedly


#1

We made the following code change (below) that involved updating the chron job time configuration. For some reason when we deployed the change to production the recurring task immediately ran at 10pm, then ran again at the next day at the specified time 2am. I wouldn’t expect the task to run immediately.

Does anyone know why this may be happening? On deployment does hangfire check to see if task has been run at this specific time, and if not try and run?

RecurringJob.AddOrUpdate(“Report.XX”, () => Definitions.Reports.RunXX(), Cron.Daily(01, 00), ConfiguredTimeZone);

RecurringJob.AddOrUpdate(“Report.XX”, () => Definitions.Reports.RunXX(), Cron.Daily(02, 00), ConfiguredTimeZone);