I would strongly recommend to do this via Powershell instead. It's way easier and perfectly works with the scheduler. Here is the code to call/trigger a URL:
$url="http://localhost/Controller/ActionToInvoke?guid=SOME-GUID" (New-Object System.Net.WebClient).DownloadString("$url"); Save this code in a *.ps1 file and create a task to execute it. That's it. No batch, no Java-/VBScript, etc. Just pure Powershell.
If you didn't allow the execution of ps scripts on your computer yet this is how you do this:
- Open Powershell as administrator
- execute the command
set-executionpolicy remotesigned
There are different viable policies instead of remotesigned. I even prefere unrestricted instead.
EDIT: If you want to be able to pass a URL as parameter, here is the modified code:
param([String]$url="") (New-Object System.Net.WebClient).DownloadString("$url"); Call the file using filename.ps1 -url http://localhost/Controller/ActionToInvoke?guid=SOME-GUID.
You can also go to the task scheduler, create a new task, enter all the random stuff, go to "Actions" enter powershell into the "Program/script" field and "C:\MyScript.ps1 -url http://localhost/Controller/ActionToInvoke?guid=SOME-GUID" into the "Add arguments (optional)" field.