Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

wscript "c:\http.vbs"

The .vbs script si a simple one, it performs a basic HTTP request:

Function HTTPGet()
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?


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.

share|improve this question
up vote 1 down vote accepted


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.

You could also wrap the batch file (a little funny since it is calling a vbs) inside a vbscript file such as:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\HTTPcheck.bat" & Chr(34), 0
Set WshShell = Nothing

The "0" parameter will force it to run hidden.

share|improve this answer
It works now, but I have to make do with 3 files: HTTPcheck.vbs with your code, HTTPcheck.bat which, in turn, calls http.vbs Wish I'd knew how to compact those files in one .vbs script, or at most 2 files, a .bat and a .vbs. Thanks! – Cristian G. Jul 10 '13 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.