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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

schedule asp script to run every hour (on IIS)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I have a asp page that lists the contents of a couple ftp servers. It takes a while for visitors to load the page (about 45 seconds), due to the connect time to the different ftp servers. Now I thought to make a script that updates a database with the ftp content every hour and then I would let the visitors query the database instead of really connecting to the ftp's every time. This would load the page for the visitor a lot quicker. Any suggestions how to schedule a script on my server?
If this isn't possible, any other suggestions to boost perfomance for my page?
Thanks in advance
Greetings
Tomas
 
You can't, to my knowledge, run a timed script on IIS. But if you are using SQL Server, you might be able to do it through the DTS packages. It can execute VBScript and VB commands. That way the DB will handle the updates, and IIS doesn't get overloaded with processes other than displaying web pages. The money's gone, the brain is shot.....but the liquor we still got.
 
Or in MSSQL Server you could use scheduled jobs with T-SQL XPs.

Or you could make a vbs script and have windows scheduling run it.

I just made the code below on my machine and it appears to work. Wouldn't be much extra to add in some FSO stuff.

test.vbs

dim obj_Connection
set obj_Connection = CreateObject("ADODB.Connection")
obj_Connection.Open "driver=Microsoft Access Driver (*.mdb);dbq=c:\ben\projects\site02\db\budget.mdb"
msgbox obj_Connection.State
obj_Connection.Close
msgbox obj_Connection.State
set obj_Connection = nothing codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
I like the idea to work with a scheduled vb script. Tested it and seems to work.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top