定期运行带定时器的asp页面 [英] Periodically running asp page with timer

查看:58
本文介绍了定期运行带定时器的asp页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp页面,它将每隔3小时从一个数据库更新数据

到我的sql server数据库。我想写代码,

会告诉页面每隔三小时自动运行一次。我该怎么办?

这个?


谢谢,


比尔

解决方案

更改为VBS并使用AT安排。
http://www.aspfaq.com/2143


雷在家


-

将为SQL Server帮助交易ASP帮助

" Bill" <毕*********** @ gospellight.com>在消息中写道

新闻:8d ************************** @ posting.google.c om ...

我有一个asp页面,它将每隔3小时将数据从一个数据库更新到我的sql server数据库中。我想编写代码,告诉页面每三个小时自动运行一次。我该怎么做
这个?

谢谢,

比尔



"比尔" <毕*********** @ gospellight.com>在消息中写道

新闻:8d ************************** @ posting.google.c om ...

我有一个asp页面,它将每隔3小时将数据从一个数据库更新到我的sql server数据库中。我想编写代码,告诉页面每三个小时自动运行一次。我该怎么办?

谢谢,

比尔


http://www.aspfaq.com/show.asp?id=2143


" Ray at<%= sLocation%>"写道:


转到VBS并安排AT。
http://www.aspfaq.com/2143




我有类似的需求**,但我也想肯定用户手动触发过程的能力

。我想避免维护重复的

脚本(一个用于最终用户的ASP脚本,一个用于调度的JS脚本),所以我

选择了一个。

你会怎样处理这种情况,Ray?


我选择ASP,主要是因为我可以在脚本运行时提供反馈,

自人类用户希望看到脚本正在做某事。这个

让我碰到了旧的如何安排ASP脚本。问题,并且

我最初是通过在SQL Server中设置一个工作来解决它的(接收更新的那个是
)。


该作业使用MSXML(特别是MSXML2.ServerXMLHTTP.4.0)来启动

脚本,并且它运行完美,直到我们将数据库服务器从NT4移动到

Win2K。我已经发现我无法成功完成计划任务

在Win2K机器上使用ServerXMLHTTP对象。


我可以创建一个VBS或JScript文件并在记录

in时成功启动它,但该相同的脚本不会作为计划任务运行。同上

已编译的可执行文件和(如前所述)SQL Server作业。


任何建议,Ray?

** In我的情况下,我需要拍摄一部分专有数据库的快照,然后将它们粘贴到一个SQL Server数据库中,这是一个内部网

应用程序的数据存储。供应商为我们提供了一些粗略的API作为我们唯一的与他们的数据库交谈的方式,并且直接与SQL Server交换

并不灵活。

-

戴夫安德森


未经请求的商业电子邮件将以

I have an asp page that will be updating the data from one database
into my sql server database every 3 hours. I''d like to write code that
will tell the page to automatically run every three hours. How do I do
this?

Thanks,

Bill

解决方案

Change to VBS and schedule with AT.
http://www.aspfaq.com/2143

Ray at home

--
Will trade ASP help for SQL Server help
"Bill" <bi***********@gospellight.com> wrote in message
news:8d**************************@posting.google.c om...

I have an asp page that will be updating the data from one database
into my sql server database every 3 hours. I''d like to write code that
will tell the page to automatically run every three hours. How do I do
this?

Thanks,

Bill



"Bill" <bi***********@gospellight.com> wrote in message
news:8d**************************@posting.google.c om...

I have an asp page that will be updating the data from one database
into my sql server database every 3 hours. I''d like to write code that
will tell the page to automatically run every three hours. How do I do
this?

Thanks,

Bill


http://www.aspfaq.com/show.asp?id=2143


"Ray at <%=sLocation%>" wrote:


Change to VBS and schedule with AT.
http://www.aspfaq.com/2143



I have a similar need**, but I also want to give certain users the ability
to manually trigger the process. I wanted to avoid maintaining duplicate
scripts (one ASP script for end users, one JS script for scheduling), so I
chose one.

How would you handle this situation, Ray?

I chose ASP, primarily so I could provide feedback while the script runs,
since a human user expects to see that the script is doing something. This
bumped me right into the old "how do I schedule an ASP script" problem, and
I initially solved it by setting up a job in SQL Server (the one that was
receiving the updates).

The job used MSXML (specifically, MSXML2.ServerXMLHTTP.4.0) to kick off the
script, and it worked flawlessly until we moved the DB server from NT4 to
Win2K. I have since found that I cannot get a scheduled task to successfully
use the ServerXMLHTTP object on a Win2K machine.

I can create a VBS or JScript file and launch it successfully while logged
in, but that same script will not run as a scheduled task. Ditto for
compiled executables and (as noted previously) SQL Server jobs.

Any suggestions, Ray?
**In my case, I need to take a snapshot of part of a proprietary DB and
stick it into a SQL Server DB, which is the data store for an intranet
application. The vendor supplied us with a somewhat crude API as our only
means of talking to their DB, and it is not flexible to talk with SQL Server
directly.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of


这篇关于定期运行带定时器的asp页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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