Skip to content

Configuration

Pass options to AddSurefire to tune runtime behavior:

builder.Services.AddSurefire(options =>
{
options.PollingInterval = TimeSpan.FromSeconds(5);
options.ShutdownTimeout = TimeSpan.FromSeconds(30);
options.RetentionPeriod = TimeSpan.FromDays(14);
options.MaxNodeConcurrency = 16;
});
OptionDefaultDescription
NodeName{MachineName}:{ProcessId}:{random}Name reported in node views and logs. Must be unique per process
PollingInterval5sFallback polling interval when notifications are not available, and the primary wakeup signal for SQL Server and SQLite
HeartbeatInterval30sNode heartbeat interval
InactiveThreshold2minInactivity window used for node/run recovery decisions
RetentionPeriod7 daysHow long completed runs are kept. Set to null to disable purge
RetentionCheckInterval5minHow often retention cleanup runs
ShutdownTimeout15sTime allowed for in-flight runs during host shutdown
MaxNodeConcurrencymin(ProcessorCount * 5, 20)Maximum concurrent executions on this node. Set to null for unlimited
AutoMigratetrueRuns store migrations at startup
SerializerOptionscamelCase, case-insensitive, numbers from stringsJSON options for job arguments and results

AddSurefire registers a health check named surefire. To expose it:

app.MapHealthChecks("/health");

Map the dashboard with app.MapSurefireDashboard(). See Dashboard for setup, authorization, and the REST API.