Hangfire runs recurring job on addorupdate

sql-server
recurring
hangfire-pro
Tags: #<Tag:0x00007f64b3ce4e50> #<Tag:0x00007f64b3ce4ce8> #<Tag:0x00007f64b3ce4b80>

#1

I have some recurring jobs, there are execute when i change the cron setting.

I can reproduce the problem with the follow steps:

  • Create an Recurring Job with the CronExpression “15 2 1 1/3 *” and TimeZone “TimeZoneInfo.Local”
  • Execute the Job and Set the LastExecutionTime in Database with the Value “2020-01-01T01:15:01.4982303Z”. It must be this value.
  • Update the Recuring Job with the to code “RecurringJob.AddOrUpdate()” to the CronExpression “15 2 1 1/6 *”

The effect is, that the job will be executed imediatly.

Why that. I think, that the job it should’nt executet now.

If i try the same with the LastExecutionTime “2020-01-01T01:50:02.7572580Z”. Then the job is not executed.