.NetCore uses Hangfire

1. Create a new blank solution

2. Add a new project ASP.NET Core Web Application-API

3. Reference NuGet packages (Hangfire.AspNetCore, Hangfire.MySql.Core) for the project

 

4. Establish a database and configure a database connection (Hangfire will generate a corresponding table in the database)

 

5. 1. The program connects to the database to be used and adds the corresponding configuration

 2. Start the hangfire service;

 3. Use the hangfire panel;

 

 

6. Add execution class Startup call

 

7. Start the project, and visit the Hangfire panel

https: // localhost: port / Hangfire

 

Guess you like

Origin www.cnblogs.com/bkymo/p/12743503.html