任务的调度方式(无需编写Windows计划)在asp.net [英] Ways of scheduling tasks (without writing windows scheduler) in asp.net

查看:162
本文介绍了任务的调度方式(无需编写Windows计划)在asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到共同主办的,他们不允许我使用Windows调度......那么什么是实现asp.net计划任务,即(定时邮寄)的方式......我刚才看到的background过程 ......难道relaible?或做计划任务的任何其他方式...

I am into shared hosting and they do not allow me to use windows scheduler... So what are the ways of achieving scheduled tasks ie(timed mail) in asp.net... I just saw background process by Jeff Atwood blog... Is it relaible? Or any other ways of doing scheduled tasks...

后来我发现 quartz.net 但我无法找到一个简单的例子嵌入到quartz.net一个asp.net( 无需安装quartz.Net服务器作为一个独立的窗口服务)...对... quartz.net

Then i found quartz.net but i can't find a simple example that embeds quartz.net into an asp.net(without installing a Quartz.Net server as a standalone windows service)... Any suggestion on quartz.net...

推荐答案

我研究的 Microsoft.Web.Administration装配附表类来实现同样的事情,但似乎类只能​​用于安排IIS工作进程重新启动,这里是<一个HREF =htt​​p://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add相对=nofollow>例如,创建应用程序池和设置定期重启的。

I was investigating Microsoft.Web.Administration assembly Schedule Class to achieve same thing but it seems that class can be used only to schedule IIS worker process restart, here is the example of creating app pools and setting periodical restart.

所以,唯一的办法就是用这个安排是ASP.NET应用程序重新启动,然后在做的Application_Start预定的工作。 但是,这是丑陋的黑客不是解决方案,所以在最后我结束了增加调度能力,以自产自销我们的备份窗口服务,它是allready Web服务器上运行,因此国际海事组织Quartz.net是您的最佳解决方案。也许你可以说服你的网络提供商安装Quartz.net所有其他的解决方案似乎是一个黑客,这将使你或多或少的问题。

So only way was to schedule with this was ASP.NET app restart and then in Application_Start do the scheduled work. But that is ugly hack not solution, so at the end I ended up adding scheduling capabilities to our homegrown backup windows service that was allready running on web server, so IMO Quartz.net is the best solution for you. Maybe you could convince your web provider to install Quartz.net all other solutions seems like a hack that will give you more or less problems.

这篇关于任务的调度方式(无需编写Windows计划)在asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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