REQUEST INFO

BLOG

Check back often, as we update our Blog with new ideas and useful information.

Most efficient ways to run background tasks in ASP.net

Posted On: 10/2/2020 9:39:30 AM
Running background tasks can be difficult to master. Managing threads, long background jobs, and keeping them streamlined is not for the weary. So what are the best solutions for running background tasks?
 

You have a couple of options when creating tasks in asp.net

  • Write your own task application
  • Use a third party application to manage the tasks

You can write your own task application to handle background processing. However, if you do not know what you are doing you can cause data issues, crashes, and a lot of damage to your website. Background jobs need functions such as Fire and forget jobs, delayed jobs, recurring jobs, continuations, batches, and batch continuations. So why invent the wheel? Using an open source background task manager such as Hangfire, simplifies the process seven fold.

Hangfire is simple, persistent, transparent, reliable, extensible and much more. This application also includes a dashboard to manage the tasks. Integrating hangfire into your application is very easy, and you can also access the sql tables as need be. Being open source, you simply add  your task code into classes within the Hangfire codebase. You may have intensive jobs that may last for several hours, and hangfire will manage all the threads and processes.

An easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required.

 

FEATURED WEBSITES