Skip to content

Instantly share code, notes, and snippets.



Created Oct 12, 2020
What would you like to do?
Configure Hangfire with MySQL
public void ConfigureServices(IServiceCollection services)
services.AddHangfire(configuration =>
configuration.UseLogProvider(new NoLogProvider());
configuration.UseStorage(new MySqlStorage(_readWriteConnectionString, new MySqlStorageOptions
InvisibilityTimeout = TimeSpan.FromMinutes(10)
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime applicationLifetime)
//if you need a dashboard for your jobs, just add this in your Configure method
/*app.UseHangfireDashboard("/hangfire", new DashboardOptions
Authorization = new[] { new HangFireAuthorizationFilter() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment