views:

72

answers:

4

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 you.

+2  A: 

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.

Marek Karbarz
+3  A: 

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.

Yann Schwartz
+1  A: 

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.

Matt Poush
A: 

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.