在PHP中,我们有cron作业,托管服务器会根据给定的时间表自动启动并执行任务.
对于ASP.NET中的CRON作业,有什么好的替代选择?我想使用Web服务,但是不能在共享主机环境中使用.任何帮助将不胜感激,请提出一种在共享主机环境中专门执行此操作的方法.
解决方案尝试 Quartz.NET .这是一个不错的.NET调度程序,它支持 CRON表达式, CRON触发器和其他各种方式和方法来安排要在特定时间/间隔执行的任务.
它甚至包括可能满足您需求的基本 Quartz.NET 服务器(Windows应用程序)./p>
如果您无法在共享托管中运行应用程序或Windows服务,则可能类似于" ASP.NET中的简易后台任务"你会吗?它使用HttpRuntime.Cache模拟Windows服务,并消除了对任何外部依赖项的需要.
In PHP we have cron jobs, where the hosting server automatically picks up and executes a task as per the schedule given.
What would be a good alternative to use for CRON jobs in ASP.NET? I'd like to use a Web service, but that will not work in a shared hosting environment. Any help would be appreciated, and please advise a way to do this specifically in a shared hosting environment.
解决方案Try Quartz.NET. It's a decent .NET scheduler which supports CRON expressions, CRON triggers and various other means and methods to schedule tasks to be performed at certain times / intervals.
It even includes a basic Quartz.NET server (Windows Application) that might fit your needs.
Edit:
If you can't run applications or windows services within your shared hosting then perhaps something like "Easy Background Tasks in ASP.NET" will do you? It simulates a Windows Service using HttpRuntime.Cache and removes the need for any external dependancies.
更多推荐
相当于ASP.NET中的cron作业?
发布评论