DEV Community

Murat Arslan
Murat Arslan

Posted on

3

Background jobs with Hangfire and .NET 6

For .NET environment sometimes you need some scheduler process for recurring jobs. Most popular schedule tools are Quartz and Hangfire.

Before, I had used Quartz in my some projects but after introduced with Hangfire, it completely changed my mind. Hangfire is open and free for commercial use. And one of my project I used Hangfire and you can see the difference between these two tools when you experience both of them. With Hangfire all database management is handled by itself. It creates all related tables as job histories, job definitions etc. automatically.

Image description

So it makes your jobs very easy. And it provides a dashboard for you to see the jobs details and manage these jobs as delete, update etc.

Image description

Also Hangfire makes the test easy with its mock library. You can mock Hangfire by using Hangfire mock and Hangfire MemoryStorage for mocking db processes .

Image description

More details and code : Go to article

Code : Github

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay