I have a batch file:
arp -s 192.168.1.254 xx-xx-xx-xx-xx-xx
ipconfig /flushdns
How can I do these two commands on Windows XP, every 10 seconds?
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Try this one:
The ping command will execute for 10 seconds, and all the output will be redirected to the NUL device, meaning that you will see no output from the ping command. It works indeed as a "sleep" command would. | |||||||
feedback
|
Edit: As mentioned in the comments, | |||||||||||||||
feedback
|
|
You could set up a Windows service to run your batch file. | |||||||||
feedback
|
|
Cheat: Use this command to pause the batch for 10 seconds choice /n/t:c,<10>/c:cc Now, place it in a never ending loop in the batch and voilĂ ! | |||||||||||||
feedback
|
|
Install Cygwin which will make | |||||
feedback
|
|
More precise solution ping unexistent host once and set timeout
But it generate parasite traffic | |||
|
feedback
|
|
below, it is both an ugly and a beautiful way, an Windows batch file - it consumes a lot of cpu time to do nothing, but it does what you want and is so nice.
| |||||||||||
feedback
|