Hangfire 1.7.2 Recurring Job not firing on server

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

Forgot to mention too, we are scheduling the job like this:

RecurringJob.AddOrUpdate(() => CheckToInitiateWorkflows(dbName), “*/1 * * * *”);

Please post here your Startup class in full (without any sensitive information, of course). Also, please show us screenshot of the Recurring Jobs page as well as logging messages produced by Hangfire.