0

I am facing strange issue of having the failure of occurrences of scheduled job which I scheduled on specific time. I rescheduled it with-in the succession of very short duration (e.g. 2 minutes ) to watch it closely. Even removed all failed jobs during this.

Also I am not using any custom or my application specific queue. I am using 'default' queue which is by default established from Hangfire side. But entirely no idea how to deal this situation.

Already read about few threads regarding this problem but they more or less specify the situation whether you are using app specific queue and failed jobs are moved around from your queue to 'default' one then. Due to this behavior Hangfire don't know how to retry the failed jobs because QueueState is not set to your app queue and you need to write custom code for that.

https://stackoverflow.com/a/67257319/273330

So my situation is different and following is the code I am using.

if (options.EnableExchangeRatesSynchronization)
{
       RecurringJob.AddOrUpdate<ISynchronizeExchangeRatesManager>(
       nameof(ISynchronizeExchangeRatesManager),m => m.Synchronize(),
              options.ExchangeRatesSynchronizationStartUpTime, System.TimeZoneInfo.Local);
}
else
    RecurringJob.RemoveIfExists(nameof(ISynchronizeExchangeRatesManager));

and nothing else fancy.

and I am getting the following report on dashboard. This job executed almost 10-12 times by considering the interval of 3 minutes as you could see in CronExpression but suddenly at some point it crashed.

enter image description here

Could anybody let me know how we could deal this?

Usman
  • 2,742
  • 4
  • 44
  • 82

0 Answers0