Recurring job's next execution time set to 9 hours ago

About 10 of my 50+ recurring hangfire jobs are showing their next execution time as a time in the past.

For example, the following job should be running every minute, but its next execution time is set at 9 hours ago:

I am also unable to manually retrieve records from the HangFire.JobQueue table - so the two issues may be related.

Any help would be greatly appreciated, and please let me know if I can provide more information on the current situation.

1 Like

I am also getting this error. It started happening after daylight saving time Sunday morning. The log files are reporting the following error (The max retry attempts is worrisome):

2016-03-14 17:00:00,490 ERROR Hangfire.Server.RecurringJobScheduler Error occurred during execution of ‘Recurring Job Scheduler’ component. Execution will be retried (attempt 12 of 2147483647) in 00:02:18 seconds.
System.ArgumentException: Only DateTime values in UTC should be passed.
Parameter name: lastInstant

Day Light Savings change doesn’t happen in the UK until the 29th of March, but this worries me enough to throw up a test VM and test this.

Manually changing the time did not have this effect on a Windows 2012 R2 server running HF in a ASP.Net Webforms app.

Will keep an eye out.

Problem with daylight savings fixed in the latest 1.5.4 release.

@njebert, logs will help to investigate the issue. Perhaps something strange is going on with delayed job scheduler.

I’m also getting an issue related to delayed job configuration

As you can see in image, the job is scheduled to be run between 8 PM to 8 AM (customer requirement is run the jobs only during night time). But still it ran 11 mins ago and next execution is in 19 mins.

Cron expression used for configuration: */30 20-8 * * *

Note: I have considered UTC timing and this snapshot is taken accordingly.

My recurring job has the cron 0 9 * * *. When I hover this expression in the Recurring jobs list it pops up with At 09:00 AM.

The Next execution column says in 17 hours and if I hover that I get Sat, Dec 24, 2016 3:00 AM.

Here are the exact property settings from the HangFire.Hash table for the job in question:
Job {“Type”:"dqsn.ETL.PartMaterialEtl, Dqsn, …}
Cron 0 9 * * *
TimeZoneId UTC
Queue default
CreatedAt 2016-12-23T16:01:26.2706144Z
NextExecution 2016-12-24T09:00:00.0000000Z

My expectation is that the Next execution time will match the cron.

Is this a bug in the Recurring jobs view or do I misunderstand how it is intended to work?

Matthew

I found the answer to my own question since posting this. The job was created with the default time zone of UTC. I changed it to TimeZone.Local and now the Next execution shows the expected time of day.

1 Like