Skip to content

Hangfire library use case project that makes it easy for us to create, execute and manage background jobs

Notifications You must be signed in to change notification settings

vmutlu/NetCore_BackgroundProcesses

Repository files navigation

Background Processes

Hangfire library use case project that makes it easy for us to create, execute and manage background jobs

What is Hangfire

It is an open source library that makes it easy for us to create, execute and manage background jobs.

Hangfire Configuration — Error Management — Security


When we run the project, when the Hangfire Dashboard page opens, there are Jobs — Retries — Recurring Jobs — Server tabs in the top menu. Hangfire is a structure designed to make it easier for us to follow our background work. It can display in many categorized ways such as working, not working, working jobs. It can also intervene (start with trigger).

  • Jobs: It is the tab where we can follow all the processes included in the process with their status;
  • Retries: It is the tab where we see the repetitions of the defined jobs as a result of possible mistakes. It can be seen how many times a job is repeated. By default, the number of repetitions is 10.
  • Recurring Jobs: It is the tab where the recurring defined jobs are seen. Although there is a set repetition, it can be triggered at any time with the Trigger.
  • Servers: This is the tab where we can see the Hangfire servers used.


  • Enqueued: next jobs
  • Scheduled: scheduled jobs
  • Processing: currently in process/running jobs
  • Succeeded: successfully completed works
  • Failed: failed jobs
  • Deleted: deleted jobs
  • Awaiting: shows jobs that are waiting for their turn.

📌 Sample Background Actions Scenario in this project

  • After the user registers, we will send an e-mail (set time) to activate the user. (Delayed Job)
  • We will make a backup of the database (Recurring Job) so that the system will repeat according to the specified time and time. We will read the information about where to take the backup from the appsettings.json file.

Delayed Job Process and process steps





📌 In Summary

I tried to convey my knowledge about creating, running and other processes with Hangfire as much as I know and learn. For more, you can visit the official site https://www.hangfire.io/ I hope it was useful. 👋

Give a Star! ⭐

If you like or are using this project to learn or start your solution, please give it a star. Thanks!

About

Hangfire library use case project that makes it easy for us to create, execute and manage background jobs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages