Hangfire Integration
Configure Hangfire as Elsa's durable workflow scheduler.
What the integration schedules
Elsa schedule
Hangfire job
Configure Elsa and Hangfire
using Elsa.Extensions;
using Hangfire.SqlServer;
var connectionString = builder.Configuration.GetConnectionString("Hangfire")
?? throw new InvalidOperationException("Connection string 'Hangfire' is missing.");
builder.Services.AddElsa(elsa =>
{
elsa.UseHangfire(hangfire =>
{
hangfire.UseJobStorage(new SqlServerStorage(connectionString));
});
elsa.UseScheduling(scheduling => scheduling.UseHangfireScheduler());
});Choose and operate storage deliberately
Know the boundaries
Verify the integration
Related guides
Last updated