Print Page | Close Window

Automated ASP Script run

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=10611
Printed Date: 31 March 2026 at 5:13am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Automated ASP Script run
Posted By: BgBoY
Subject: Automated ASP Script run
Date Posted: 26 May 2004 at 5:30pm

Hello,

i wrote a small script to ping all the computers in our network so see which one are online and which aren't ...

Everytime an employee visits the page, the script is run and the results are written to a database ... But now, i want to shedule the page so it is loaded every 5 minutes, indepent from the result page ...

How can i do this ??? Sheduled Tasks  from windows 2000 won't work ... I read i have to do something with the ASP.DLL and Windows Script Host, but i don't get it :) ...

(script to ping is default.asp)




Replies:
Posted By: Mart
Date Posted: 26 May 2004 at 5:33pm
Why won't scheduled tasks work?


Posted By: BgBoY
Date Posted: 26 May 2004 at 5:37pm

Becausesheduled tasks can't run websites from your localhost IIS server. I can execute the asp site itself, but then it opens Frontpage.

(i forgot to mention in my question, is it possible to run it in background, so no window pops up?)



Posted By: Mart
Date Posted: 26 May 2004 at 5:48pm

Well you can just set the task to open

iexplore http://www.yourdomain.com/yourtaskpage.asp - http://www.yourdomain.com/yourtaskpage.asp

that would opena window however, but you could make it spit out a javascript that closes the browser window after execution



Posted By: dpyers
Date Posted: 26 May 2004 at 7:36pm

To prevent it from opening Front page, you have to changde your file associations - use ie for "open", and fp for "edit". Also add fp to the right-click "open-with" menu.

Back with W2K, I seem to recall running localhost web pages through scripting by executing a shortcut to the file rather than the file itself. Always opened a window though.

One approach that many people use to run scheduled asp scripts that don't produce page output is to get a $2/$3 a month unix account with crontab capability. Execute the page through cron using the Lynx browser and redirect any output to /dev/null.

I use this approach to get and format news feeds once an hour or so. Speeds up the page loads as the user doesn't wait for the feed.

 



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: BgBoY
Date Posted: 27 May 2004 at 2:46am

Another problem (with the iexplore parameter) is that when you let the javascript close the window, it pops up an dialog box to ask whether the script may close the page or not ... pretty heavy if you aren't on that machine for over 24 hours (you may close all 24 windows then)

any other solutions ? (like the WIndows Scripting Host)



Posted By: Mart
Date Posted: 27 May 2004 at 2:53am

You could write your own little utility to do that, in .net it would be something like this

Dim strURL As String = http://www.yourdomain.com - http://www.yourdomain.com

Dim wc As New System.Net.WebClient

wc.DownloadData(strURL)

System.Threading.CurrentThread.Sleep(10) 'Time to wait for (MS)



Posted By: TYSON
Date Posted: 01 June 2004 at 6:25am
Why couldnt you just have a meta refresh in the page and leave the browser window open at the page?

-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net