Why do these recurring jobs not recur?

Tags: #<Tag:0x00007f49a6df9d40>


I have around 400 recurring jobs at the moment. 398 of them run just fine and are scheduled with code like this:

jobMgr.AddOrUpdate($"Script.{name}", Job.FromExpression(() => EnqueueTheScript(scriptId, i1, null)), cronExpression);

I have two other jobs that are scheduled to run daily, but they never re-run. In the recurring jobs dashboard they appear at the top of the dashboard and under “Next Execution” it will say “5 days ago” and under “Last Execution” it will say “6 days ago” (the number of days changes each day of course.)

I can trigger them manually on the dashboard and they run fine, but again, they never re-run.

How is this even possible?

Here’s the code used to schedule these scripts:

var jobMgr = new RecurringJobManager(HangfireHelper.GetJobStorage(environment));
    Job.FromExpression(() => CleanHistory(environment, null)),
    "0 16 * * *");
    Job.FromExpression(() => RunDailyReport(environment, true, "",null)),
    "0 21 * * *");