ASP.NET MVC的基于时间的Job Scheduler [英] Time-based Job Scheduler for ASP.NET MVC
问题描述
我想每小时从API获取数据。
我的想法是每小时自动触发一个方法来获取数据。
我想要一个简单的解决方案。此外,我的项目将使用Azure。我有什么选择,我该如何处理?
I want to fetch data from an API on hourly basis.
My idea is to trigger a method automatically every hour to fetch the data.
I want a simple solution. Also, my project will be using Azure. What are my options and how do I go about it?
推荐答案
如果您想在90秒内延迟一个时间来处理每个请求的任务,请使用
主机环境 。
If you wanna delay a time within 90 Seconds to process with a Task for each request, Please use HostEnvironment.
但我坚持你使用PURE背景工作人员,例如" Windows Service" + Azure ,或一些第三方工具:
But I insist you using a PURE background worker such as "Windows Service" + Azure, or some 3-rd party tools:
https://github.com/fluentscheduler/FluentScheduler
https://github.com/fluentscheduler/FluentScheduler
这篇关于ASP.NET MVC的基于时间的Job Scheduler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!