你会如何安排每24小时间隔在asp.net上运行的任务?

问题描述:

你如何安排每隔24小时在asp.net上运行的任务?

例如,每天凌晨1点自动进行夜间审核。

你会怎么做?



这个asp.net托管在一个网络共享托管网站上。

我没有修改Windows服务的权限。

How would you schedule a task that run on asp.net every 24 hours of interval?
For example, run a night audit automatically at 1:00 AM everyday.
How would you do that?

This asp.net is hosted at a web share hosting site.
I don't have the privilege to modify Windows Service.

Asp.Net服务器仅在有人请求页面或从服务器发送Web查询时运行代码。如果它不在您自己的服务器上托管,那么您将无法访问许多服务器功能。那么,在你的情况下,似乎唯一的办法是在客户端PC上运行一个程序,在预定的时间发送请求?

如评论中所述,如果网页背后有SQL,那么这可能是一种选择。
Asp.Net server only runs code when someone requests a page or sends web queries from the server. If it's not hosted on your own server then you won't have access to many server functions. So, in your case, it seems the only way is to run a program on your client PC that sends a request at the scheduled time?
As mentioned in comments, if the web page had SQL behind then that may be an option.