Hi
We’re having a lot of trouble getting a recurring job to fire on an ASP.Net application. It runs fine on our local PC, but when we deploy to the server the job never fires.
We have the configuration set as:
GlobalConfiguration.Configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseLog4NetLogProvider()
.UseSqlServerStorage(GetConnectionString(), new SqlServerStorageOptions
{
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero,
UseRecommendedIsolationLevel = true,
UsePageLocksOnDequeue = true,
DisableGlobalLocks = true
});
yield return new BackgroundJobServer();
We never see any records created in the Hangfire.Job table for this job.
What’s weird too, is that the Hangfire.Server table has two records?
We are creating the Hangfire BackgroundJobServer in our App_Startup event
Any ideas how we get to the bottom of this one?
Thanks