Home » Questions » Computers [ Ask a new question ]

Do something every 10 seconds batch file

Do something every 10 seconds batch file

I have a batch file:

Asked by: Guest | Views: 251
Total answers/comments: 3
Guest [Entry]

":top
arp -s 192.168.1.254 xx-xx-xx-xx-xx-xx
ipconfig /flushdns
sleep 10
goto top

Edit: As mentioned in the comments, SLEEP won't be available in a normal install. You'll need something like the Windows 2003 Resource Kit, or some other trick to simulate it (the ping trick Bruno mentions), and notes to do so can be found here."
Guest [Entry]

"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à!"
Guest [Entry]

Install Cygwin which will make sleep and cron available to you (among other things).