简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM