你会如何安排每24小时间隔在asp.net上运行的任务? [英] How would you schedule a task that run on asp.net every 24 hours of interval?

查看:72
本文介绍了你会如何安排每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.


这篇关于你会如何安排每24小时间隔在asp.net上运行的任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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