birdcage
birdcage

Reputation: 2676

Windows server plesk scheduled http request

I have windows hosting and it uses plesk. I want to make http request in every 30 mintues. I have written a vbs script to do this. Below you can see the code. But I am wondering what to write in "Path to executable file" field.

Also I set "Arguments" field as /httpdocs/scripts/web_visit_script.vbs

Here is vbs file code:

Call Send_HTTP_Request()

Sub Send_HTTP_Request()

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

            'Declare variables
            Dim objRequest
            Dim URL

            Set objRequest = CreateObject("Microsoft.XMLHTTP")

            'Put together the URL link appending the Variables.
            URL = "http://www.google.com"

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

            'Send the HTML Request
            objRequest.Send

            'Set the object to nothing
            Set objRequest = Nothing

End Sub

Upvotes: 0

Views: 305

Answers (1)

Sean W.
Sean W.

Reputation: 863

Technically c:\windows\syswow64\cscript.exe should be enough as the path to the executable. If that is not enough then I recommend making a .bat file in that scripts folder with the following code: c:\windows\syswow64\cscript.exe web_visit_script.vbs and then simply call that .bat file in the path to executable with no arguments.

Thanks,

Sean W.

Upvotes: 1

Related Questions