Iterruption of background process on half of cycle

I have a cycle foreach inside my background process i need to repeat every 40 minutes:
image001

The array of switches contains 212 items, and that process must finish in 3 minutes. But when cycle reaches 90 item, it starting again with first. What can be the problem?
Also this is my hangfire defenition in Startup.Auth.cs:

var server = new BackgroundJobServer();
GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection");
var options = new DashboardOptions { AppPath = VirtualPathUtility.ToAbsolute("/Global.aspx") };
app.UseHangfireDashboard("/hangfire", options);
app.UseHangfireServer(new Controllers.HomeController.BackgroundProcess());

Have you checked the log? It might be restarted because of exception.

1 Like

I have a similar issue (and I am definitely not getting any exceptions). My post http://hangfire.discourse.group/t/my-job-executes-an-arbitrary-number-of-times-even-though-only-scheduled-once/4393

I didn’t even know that there are logs. Thank you.