开发者

Most efficient way to create reports every 15 minute?

开发者 https://www.devze.com 2022-12-11 07:24 出处:网络
I currently have an ASP Classic script that runs every 15 minutes (via scheduled task). The task is responsibly for opening up Internet Explorer and loading the create report ASP page.Once the page is

I currently have an ASP Classic script that runs every 15 minutes (via scheduled task). The task is responsibly for opening up Internet Explorer and loading the create report ASP page. Once the page is done loading, I have Javascript at the bottom of the page responsible for closing the IE window. We often run into issues where the script will hang for whatever reason and not reach the end. Thus, we end up with multiple IE instances at the end of the day. However, generating report in this manner seems very clunky and unnatural. I am using IIS and switching over to .NET.

Would anyone have any alternatives?

Thank yo开发者_开发百科u.


Why don't you just call your ASP page using a plain XmlHttpRequest script in vbscript, instead of running Internet Explorer?

Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", "http://yourserver/yourReportPage.asp", FALSE
http.send ""

Dim content
content = http.ResponseText
set http = nothing

Use this instead of calling IE.

Now, there may be better way to generate the reports, but at least this way you get rid of the scary IE automation.


We use SQL Reporting Services for this very purpose. We used to have a system very similar to yours, but haven't had any problems since migrating to RS.


Does it have to be called through the HTTP interface? That is, can you make a command-line project that does the same thing? If you can, you can easily set up a scheduled task to call the command-line app every 15 minutes.


Something that needs to run on a regular schedule seems like it would be related to a database. If that's the check out SQL Server Agent (presuming SQL Server) and store your results into a table that can be queried quickly from the ASP page.

0

精彩评论

暂无评论...
验证码 换一张
取 消