views:

553

answers:

7

I need to schedule several different pages on several different sites to be run at certain times, usually once a night. Is there any software out there to do this? it would be nice if it called the page and then recorded the response and whether the called page was successful run or not. I was using Helm on a different box and it had a nice Web Scheduler module but Helm is not an option for this machine. This is a Window Server 2008 box.

+3  A: 

How about wget.exe and the task scheduler?

Mark Allen
A: 

If it's not a requirement to schedule them from the same box, have a look to Zoho's site24x7.

It is initially designed to monitor web sites but it has an option to record expected answers and compare them so you can use it for your purpose with the added security of an external site. It's not free however except for few urls.

They are other similar providers but they looked pretty good last time I searched the web on this topic.

+5  A: 

We use standard scheduled tasks that call a bat file that calls a VBS file. I know it is not the most elegant solution ever, but it consistently works.

BAT:

webrun.vbs http://website.com/page.aspx

VBS:

dim URL, oArgs  

Set oArgs = WScript.Arguments  

    if oArgs.Count = 0 then  
    msgbox("Error: Must supply URL")  
    wscript.quit 1  
    end if  

URL = oArgs(0)  

 on error resume next  
Set objXML = CreateObject("MSXML2.ServerXMLHTTP")  

    if err then  
    msgbox("Error: " & err.description)  
    wscript.quit 1  
    end if  

' Call the remote machine the request  
    objXML.open "GET", URL, False  

    objXML.send()  

' return the response  
    'msgbox objXML.responSetext  

' clean up  
    Set objXML = Nothing

The code in the VBS file is almost assuredly both overkill and underwritten, but functional none-the-less.

JoshBaltzell
I ended up doing almost the exact same thing - thanks for the help!
Slee
I found when using this on a 2008 server I had to invoke the vbs file with wscript otherwise it would not pick up the argument i.e. wscript webrun.vbs http://someurl/
Bittercoder
much nicer option than wget as it doesn't require anything additional installing on the server
dnolan
A: 

I ended up using this script and Task Scheduler, simple and works great:

Call LogEntry()
Sub LogEntry()

'Force the script to finish on an error.
On Error Resume Next

'Declare variables
Dim objRequest
Dim URLs
URLs = Wscript.Arguments(0)
Set objRequest = CreateObject("Microsoft.XMLHTTP")

'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "POST", URLs, false

'Send the HTML Request
objRequest.Send

Set objRequest = Nothing
WScript.Quit

End Sub

Then I just call it with the URL I want run as an argument:

Slee
A: 

Similar (though possibly more powerful) is netcat and its windows port

Greg Ogle
A: 

fyi - wget is GNU standard license, so I'm not sure it's usable for most commercial/proprietary systems.

A: 

I use http://scheduler.codeeffects.com. Very effective and reliable, no complains.

Regina