如何在ASP.NET中运行后台任务 [英] How to run Background Tasks in ASP.NET

查看:126
本文介绍了如何在ASP.NET中运行后台任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每隔5分钟,我需要在Asp.net MVC中运行一些任务.我从未从事过此类功能.因此,我用谷歌搜索并获得了实现此功能的一些选项.这些是此处

I need to run some tasks in Asp.net MVC, after every 5 minutes. I've never worked on such functionality. So i googled it and got some options to implement this functionality. These are the options here, here and here

我已经查看了以上链接.这些都使人们选择最佳的流程来运行后台流程.

I've looked over the above links. These all just confuse the person to choose best process to run background process.

我对这种功能还很陌生,这就是为什么我在这里讨论/询问实现该功能的几种方法.

I'm new on such functionality, that's why I'm here to discuss/ask the several ways available to implement it.

推荐答案

您可以使用 Hangfire ASP.NET中的后台作业.您可以在 HangFie教程中找到.

You can use Hangfire It's a fantastic framework for background jobs in ASP.NET.You can find HangFie Tutorial Here.

Hangfire的最佳功能是其内置的/hangfire仪表板,它可以向您显示所有计划的,正在处理的,成功的和失败的作业.这确实是一个不错的补充.

The best feature from Hangfire is its built in /hangfire dashboard that shows you all your scheduled, processing, succeeded and failed jobs. It's really a nice polished addition.

所有这些库都很出色,都是开源的,并且可以作为 Nuget软件包使用.

All these libraries are excellent, are open source, and Available as Nuget Packages.

一些其他选项

QUARTZ.NET

FLUENTSCHEDULER

WEBBACKGROUNDER

这篇关于如何在ASP.NET中运行后台任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆