0

I am building a web application in asp.net MVC and am thinking how I can get certain conditional tests to happen regularly.

Currently I am planning on having a page such as /utility/runJobs that will have a function in it that will test the whole site for dates meeting certain conditions etc..

I would then trigger this page from a service or other trigger service.

I would probably run this every min incase new notifications had to be sent out, or a Log item had to be written, or a status updated.

Can anyone suggest a better way of doing this.

EDIT___________

Imagine how the notification emails for ebay are sent?

I guess that the badges on stack over flow are tested when a user comes to the site, and only for that user.

4

2 回答 2

1

如果您打算编写一个服务来触发您的工作,那么我建议您在服务中执行您的工作。

使用 MVC,您希望已经将您的逻辑与您的视图分开,因此应该很容易实现该服务。

于 2009-10-12T11:48:26.600 回答
0

第一个重要提示:您要执行的操作不需要单个网页。或者,您真正需要考虑的是服务、命令行应用程序和排队,而不是每分钟点击一次的页面。

于 2009-10-12T15:59:16.003 回答