How to configure “Hangfire.Net” in .NET Core conso

2019-09-21 08:48发布

I am creating a console application in which I need to perform some tasks in parallel so I am trying to use Hangfire.Net.

Can anyone please suggest me how to configure Hangfire.Net in .NET Core console application?

Kind regards,

Jatinder

1条回答
Emotional °昔
2楼-- · 2019-09-21 09:29

Configuration of Hangfire in .Net Core is quite state forward This will store it in the database.

GlobalConfiguration.Configuration.UseSqlServerStorage("connection_string");

using (var server = new BackgroundJobServer())
    {
     Console.WriteLine("Hangfire Server started. Press any key to exit...");
     Console.ReadKey();
    }

Code ripped from documentation

查看更多
登录 后发表回答