I'm looking at the ping command help and i cant see a parameter to change the time between pings. I don't mean the timeout time.

(For example i want to send a ping every 5 seconds)

Is this possible?

link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

from a broadband forum:

Batch file

@echo off
:start
ping -n 1 <destination>
ping -n 5 127.0.0.1 > NUL 2>&1
GOTO start

or in a single command

for /L %i in (1,0,2) do @ping -n 1 <destination> & ping -n 5 127.0.0.1 > NUL 2>&1
link|improve this answer
ping -n 5 127.0.0.1 > NUL 2>&1 Whats this doing? – tm1rbrt Jan 15 '10 at 12:56
> NUL redirects a program's output to the special file NUL, like /dev/null on Unix. And 2>&1 redirects stderr (all error messages) to the same place. – grawity Jan 15 '10 at 13:17
In general, this is a way to make it wait: "5 pings" to your own computer, without displaying results, before coming back to the beginning and doing the ping your are interested in. – Gnoupi Jan 15 '10 at 13:25
aaah. Seems a bit hacky thought :( – tm1rbrt Jan 15 '10 at 13:26
1  
tm1rbrt: If you're on Vista you can also use timeout if that feels less hacky :-) – Joey Jan 15 '10 at 14:40
feedback

I don't think you can.

ping -t will send forever, but at the default rate.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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