如何在asp中每天运行cron作业.网络核心应用? [英] How to run cron job every day in asp. Net core application?

查看:22
本文介绍了如何在asp中每天运行cron作业.网络核心应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用 asp 编写的 Web 应用程序.净 mvc 核心 2.2.O 需要在每天凌晨 3:00 运行计划作业.最好的方法是什么?

I have a web application written in asp. Net mvc core 2.2. O need to run a schedule job every day at 3:00 Am. What is the best way to do it?

我试过 Hangfire 它在一段时间后停止了.我们需要设置 IIS 服务器始终运行.我在 .Net 核心中搜索并找到了托管服务.谁能告诉我在 dot net core 的 web 应用程序中每天运行工作的最佳方法是什么?

I tried hangfire it stops after some time. We need to set IIS server always running. I googled and found hosted service in. Net core. Can anyone tell me what is the best approch to run a job daily in web application in dot net core?

推荐答案

老实说,我没有亲自为 .NET Core 尝试过它,但是您是否尝试过 Quartz Scheduler?https://www.quartz-scheduler.net/通过这篇文章,似乎您也可以将它与 .NET Core 一起使用

I've not personally tried it for .NET Core honestly, but have you tried Quartz Scheduler? https://www.quartz-scheduler.net/ By this article, it seems you can use it with .NET Core as well

这篇关于如何在asp中每天运行cron作业.网络核心应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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