Computing.Net > Forums > Disk Operating System > ping comand

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

ping comand

Reply to Message Icon

Name: Mr Kurt Galloway
Date: September 11, 2000 at 10:00:07 Pacific
Comment:

DOS Novice

I would like to know how to set the ping comand. My ISP has a cut off of 5mins cna you please show me how to ping my service provider every 3 minutes (I have there I.P. address)

Thankx for any help



Sponsored Link
Ads by Google

Response Number 1
Name: DoOMsdAY
Date: September 11, 2000 at 12:47:34 Pacific
Reply:

If this is real DOS, I don't think you can (since it won't run multiple processes - with the exception of TSRs.) If this is NT, you can schedule things to happen, however I am unsure of if you can say "hey, do this every three minutes" or not. The command for that is 'at'. Look it up in Windows help. If it's 9x, you could write a Batch file to run. An example:



@echo off
:start
cls
echo ---[Pinging Server]---
ping -n 1 xxx.xxx.xxx.xxx
echo ---[Hit 'x' To Exit]---
choice /c:xa /t:180,a /n
if errorlevel==2 goto start
cls


Replace xxx.xxx.xxx.xxx with the IP address you wish to ping and /t:180 with a different number if you don't want 180 s or 3 minutes between pings. Also, the last 'cls' is to close the DOS box that will open with this program.

0

Response Number 2
Name: K
Date: January 4, 2001 at 07:42:14 Pacific
Reply:

With NT or 2000 and any one of several Resource Kit executables (like SLEEP.EXE, WAIT.EXE, SOON.EXE, CHOICE.EXE, etc.) you can write a simple batch file that says something like...

---begin file---

top
ping -n 1 xxx.xxx.xxx.xxx
sleep xx
goto top

---end file---

Set the sleep time to 4 minutes or so and it will run the ping command in that interval. To reduce traffic, I used the -n 1 switch to say ping only once. However, if the ping fails, it will still wait 4 minutes before trying again. You might want to make it -n 2 or just leave it out altogether.

For the post above... "cls" doesn't close a DOS box, it merely clears the screen.


0
Reply to Message Icon

Related Posts

See More


ping Gate A-20 ERROR ?????



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: ping comand

ping www.computing.net/answers/dos/ping/4116.html

constant ping www.computing.net/answers/dos/constant-ping/3232.html

ping stat. www.computing.net/answers/dos/ping-stat/6010.html