相当于ASP.NET中的cron作业? [英] What is the equivalent to cron jobs in ASP.NET?

查看:78
本文介绍了相当于ASP.NET中的cron作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PHP中,我们有cron作业,托管服务器会根据给定的时间表自动启动并执行任务.

对于ASP.NET中的CRON作业,有什么好的替代选择?我想使用Web服务,但是不能在共享主机环境中使用.任何帮助将不胜感激,请提出一种在共享主机环境中专门执行此操作的方法.

解决方案

尝试 Quartz.NET .这是一个不错的.NET调度程序,它支持 CRON表达式 Quartz.NET 服务器(Windows应用程序)./p>

如果您无法在共享托管中运行应用程序或Windows服务,则可能类似于"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作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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