Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SqlServerStorageOptions] Is it possible to control JobExpirationCheckInterval cron time? #2428

Open
samirvarandas opened this issue Jul 23, 2024 · 0 comments

Comments

@samirvarandas
Copy link

var options = new SqlServerStorageOptions
{
CommandBatchMaxTimeout = TimeSpan.FromMinutes(21),
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero,
UseRecommendedIsolationLevel = true,
DisableGlobalLocks = true,
SqlClientFactory = SqlClientFactory.Instance,
PrepareSchemaIfNecessary = true,
EnableHeavyMigrations = false,
DeleteExpiredBatchSize = 1000,
TryAutoDetectSchemaDependentOptions = true,
JobExpirationCheckInterval = TimeSpan.FromDays(1)
};

I am setting JobExpirationCheckInterval to 1 day but i have no control about when it will run exactly
Is it possible to run this routine daily at 3am? It appears to run on random hours. Does it consider 1 day after the start of the aplication to decide at what time it will run?

I am having issues with a big database full of jobs, and sometimes when it starts my aplication is unable to enqueue jobs due to locks on the SQLServer [Hangfire].Job table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant