Easy Steps for Scheduling an HTTP Request on Windows
There are actually several ways to do this in Windows, and none of them require any manual intervention, at least after creation of the script you'll use to run the request, or have it scheduled as a recurring task. These can be very handy of course, when you don't want to have to remember to run the script every day, or if you simply won't have the time or access on any given day. Below are shown some of the different ways you can call a web page or schedule another task to be executed, some a bit lengthier, and some which offer a more elegant and concise solution.
As of version 5.0 of PowerShell, an alias for Invoke-WebRequest has been created, simplifying the process of scheduling a request.
Invoke-WebRequest can still be used, but its alias, 'curl' is far more compact and concise.
Action: Start a program
Add arguments: curl http://www.example.com/foo/bar
Insert the code below (meant to call a web page) into a VBS script file called ‘callmywebpage.vbs’ (after setting the correct URL in the code), then save it somewhere easily remembered, such as Desktop or My Documents
'Begin VBS script code:
Sub LogEntry() 'Force the script to terminate when an error is encountered
On Error Resume Next 'Declare the variables
Dim URL 'The URL link
URL = "http://www.yourwebsite.com/image-webcam-overlay.php"
Set objRequest = CreateObject("Microsoft.XMLHTTP") 'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "GET", URL , false 'Send the HTML Request
objRequest.Send 'Set the object to nothing
Set objRequest = Nothing
End Sub 'End VBS script code