English 中文(简体)
网络应用如何在共享的东道方完成时间安排任务?
原标题:How the web application to achieve the schedule task on a shared host?

如我所知,<代码>quartz.net附表r在global.asax上启动。 也就是说,除非有人访问网站,否则quartz.net附表r不工作。 这不是一种安全的方法,因为机桌旁的路面可以通过更换服务器或终止国际电离层扰动池的工艺而丧生,而机面的开端将持续到有人再次访问网站。

我们可以利用窗口时间表解决这一问题。 但是,我们正在使用“共享的东道<>/strong>,我们不能书写服务或板球服务器的工作或安排东道国的窗口任务。

If we are sure that our site be visited every day, this is not a problem. If not, how can we ensure that the web scheduler work all the time even if no one visit our site for days and even if the server is rebooted?

问题回答

You should install quartz.net as a windows service and access it from your web app via remoting. This will guarantee that the scheduler is always running. Instructions for setting up the scheduler as a windows service are here: Getting Started with Quartz.Net Part 1

The easiest way is to get have a Scheduled Task on the server trigger your job (by requesting the page). If you don t have a server that can do this you can use something like pingdom to hit a page at n intervals.

If you do have a server to do this you can also write a service - but for something trivial I d just use a scheduled task.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!