Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have scheduled a taks on my windows 7 machine to run every 15 minutes and I have that working.

The command is C:\wamp\bin\php\php5.3.5\php.exe -f "C:\wamp\www\vmstage.php"

Still, all working. When running that php script, it returns some text. Is it possible to keep cmd open for a few seconds so I can see what the result was?

Right now, the behavior is:

  1. cmd opens
  2. script runs
  3. waits for result (2-5 seconds)
  4. returns data
  5. cmd closes
share|improve this question
up vote 1 down vote accepted

There's a timeout command that will pause shell for some period of time or until you press a button. You can create a .cmd file with a content like that:

C:\wamp\bin\php\php5.3.5\php.exe -f "C:\wamp\www\vmstage.php"
timeout 5

.cmd files are just a lists of commands that are executed top to bottom. This one will execute your task and wait for 5 seconds. Schedule that file's execution instead of your current command.

share|improve this answer
is it possible to do the reverse? I want the execution of the php script to happen and then timeout – Ronnie Mar 28 '13 at 20:11
nevermind, just tested it and it works. thank you! I'll accept in 5 mins. Won't let me yet – Ronnie Mar 28 '13 at 20:12
You're welcome. I've edited the answer to be more clear and correct. – gronostaj Mar 28 '13 at 20:14

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.