Forum Moderators: phranque
I was wondering how I could make a C++ or Java program to access a particular page on my site and refresh it at regular intervals, say every hour?
Or if anyone could think of any other way to accomplish running the script regularly, that would also be appreciated.
If so, you can set a schedule to run a simple WSH file that will access the page in question. I do it all the time.
In the WSH file you could do something like:
url = "http://www.example.com"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
'content = xmlhttp.responseText
set xmlhttp = nothing
WScript.Echo(content)
Joe
EDIT: changed URL
I was having problems with Task Scheduler though so it took me a while to get everything to work. First I had a 'The data area passed to a system call is too small' error. This was fixed using the following .bat file:
[jsiinc.com...]
Also, you have to have a password for the tasks. Tweak #67 on this page makes it so you don't have to use a password:
[kellys-korner-xp.com...]
Maybe this info can help somebody else. Thanks guys.