SkillAgentSearch skills...

HostFun

Example of running Hangfire as an `IHostedService`

Install / Use

/learn @geirsagberg/HostFun
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

HostFun

This is an example of using HostBuilder and IHostedService for hosting Hangfire in a non-web-app while hosting the Hangfire dashboard in a separate web app.

How to run

  • dotnet run --project HostFun - This will start the standalone Hangfire Server
  • In another terminal: dotnet run --project HostFun.Web - This will start the Hangfire Dashboard
  • In a third terminal: dotnet run --project HostFun.SecondApp - This will start a console app that queues a single job

Now you should be able to see 1 succeeded job in the dashboard.

Related Skills

View on GitHub
GitHub Stars19
CategoryDevelopment
Updated2y ago
Forks3

Languages

C#

Security Score

75/100

Audited on Nov 16, 2023

No findings