Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling using asp

Status
Not open for further replies.

giahan

Programmer
Sep 1, 2000
139
US
I am looking for a way to run a file (call "test.asp") every Monday at 7:00Am and report if it runs successfully.
Does ASP have this ability? If yes, please instruct.

Thanks

GH
 
ASP pages are really designed to run interactively.

It sounds like what you are trying to do would be more easily facilitated with Windows Scripting Host, which would allow you to run VBScript or Javascript code like a batch file.

Then you could simply schedule a batch file with at (make sure the scheduler service is running) that contains the script you want to run. You could send notification via e-mail, printer, file or any other means you want to script.
 
I know how to do it in WSH, ColdFusion but I think there is a way to do it in ASP but it's not )-:{].

Thnks

GH
 
You could use at to schedule wget (you can get it as part of cygwin or do a web search for it) to open the page every day.

Your page would handle any notifications as above. It would run as normal from the wget session. You could actually response.write the results to the page, and wget would save the current results in the file it retrieves since it would save the output.

That is the only way I could think to execute .ASP code on a scheduled basis without A) keeping a browser open at all times and B) using an enormous amount of CPU time idleing in a loop for 23 hours and 59 minutes each day :)
 
IF using NT, How about an old fashion way. Create a dos batch file which Starts the asp page (or a shortcutlink to the asp page). Schedule the bat file in the windows scheduler.

Eric Searing
eric.searing@wcom.com
 
The problem is that you will have tons of extra web browser processes running on the machine, and the machine would have to be logged in interactively to run the web browser (it can't run as a service)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top