If you look at the SQLServerStorage class in GitHub you can see the default settings.
public SqlServerStorageOptions()
{
TransactionIsolationLevel = null;
QueuePollInterval = TimeSpan.FromSeconds(15);
InvisibilityTimeout = TimeSpan.FromMinutes(30);
JobExpirationCheckInterval = TimeSpan.FromHours(1);
CountersAggregateInterval = TimeSpan.FromMinutes(5);
PrepareSchemaIfNecessary = true;
DashboardJobListLimit = 50000;
_schemaName = Constants.DefaultSchema;
TransactionTimeout = TimeSpan.FromMinutes(1);
}
For one of my projects I wanted to expire some of my manually enqueued jobs after 1 minute. To override the above default settings I used the following in my Hangfire initialization code.
GlobalConfiguration.Configuration.UseSqlServerStorage("DbConnectionString",
new Hangfire.SqlServer.SqlServerStorageOptions
{
JobExpirationCheckInterval = TimeSpan.FromMinutes(1)
});