I am trying to get a scheduled task on Windows 7 to execute once a minute, using schtasks and a batch file.
My .bat batch file is:
@ECHO OFF
wscript "c:\http.vbs"
The .vbs script si a simple one, it performs a basic HTTP request:
Function HTTPGet()
HttpRequest("my_url_is_here")
End Function
If I run the .bat file from a command prompt, it does its job nice and smooth. But if I try to schedule the .bat, i.e.
schtasks /create /sc minute /tn "HTTPCheck" /tr "C:\HTTPCheck.bat"
I keep seeing the command prompt window for a split second on my screen, each minute.
Is there something I could do to prevent that window from flashing before my eyes?
Thanks!
L.E. I cannot use third party software, I want regular users to be able to run it w/o installing anything.
Long story short, I need to make a HTTP GET request without having the command prompt window pop out on my screen every minute.
Best Answer
Cristian,
I don't know how others choose to do it, but I've used JoeWare's "Quiet" program to spawn hidden (except from taskmgr) batch files in the background.
http://www.joeware.net/freetools/tools/quiet/index.htm
You could also wrap the batch file (a little funny since it is calling a vbs) inside a vbscript file such as:
The "0" parameter will force it to run hidden.