Saved Bookmarks
| 1. |
Solve : just learning? |
|
Answer» Quote from: Reno on April 07, 2009, 10:55:08 PM pinging for 15minutes seems like not a good idea, could have some side-effect which i am not sure of. besides ping delay is not really accurate. that's why in the first PLACE i suggest using vbs sleep function instead of ping. True, but if you are using it on computers which may not have sleep, ping is your best (only) choice. Although it seems fairly accurate...not to nano seconds, but I've made a stopwatch in batch...almost...Quote from: Helpmeh on April 08, 2009, 05:49:41 AM True, but if you are using it on computers which may not have sleep, ping is your best (only) choice. Although it seems fairly accurate...not to nano seconds, but I've made a stopwatch in batch...almost... All Windows computers have VBScript, and can use sleep.vbs. I did look for a virus and Norton said I'm Clean but that dosen't mean everything. I do like to download games and the cracks may have something looming around I use this command for work (I Work for a cable co) to check for NETWORK problems and Iperf is the program they offer but I got tired of typing it in to a command line so I started this file. I ran a test last night with the command and it worked perfectly until I needed to stop. I used CTL-C it asked if I wanted to terminate Y or N of course I said yes......and window gone. That was my only mistake NEXT time I will say No then I can copy my results before closing the window. I will give this out to others in my company so I just want to get it right as I can. Quote >$sleep.vbs echo wsh.sleep 900000 This worked grate is there a way to tell it to stop after 24hrs but not close the window? Isn't there a timeout command I can try. In need to copy it into a text doc to be emailed. Again thank you JamesHey Reno, The code you posted put the command to sleep just as you said but it never recovers. I even shorten the time. When I tested it earlier I did not give it enough time to see if it would run the next test. It is just what I looking for. any ideas James Quote from: olo131 on April 08, 2009, 05:02:41 PM is there a way to tell it to stop after 24hrs but not close the window? Isn't there a timeout command I can try. In need to copy it into a text doc to be emailed.Quote from: olo131 on April 08, 2009, 09:18:29 PM The code you posted put the command to sleep just as you said but it never recovers. I even shorten the time.the code is only for sleep, so after sleep, you have to use some sort of restarting, eg. goto statement, call, restart the batch %0, etc 24 hours stop:15minutes = 4x / hour 24hr x 4x = 96x not exactly 24 hours, roughly around 24hours + 96 * (time needed to run batch file) Code: [Select]@echo off echo. echo CREATED FOR KNOLOGY SPEED TEST by: OLO 131 >$sleep.vbs echo wsh.sleep 900000 for /l %%a in (1 1 96) do ( call:B cscript//nologo $sleep.vbs ) echo 24hrs!! do copy here.. goto:eof :B echo. echo Time and Date of Test echo. Date /t Time /t echo. echo Iperf Speed Test Server xx.x.xx.xxx iperf -c xx.x.xx.xxx -r -w 64k -t 20 -i 1 echo. echo. echo. echo. echo Ping Iperf Server Test ping xx.x.xx.xxx -n 20 -l 64k echo. echo. echo Trace Route Iperf Server tracert xx.x.xx.xxx echo. echo. echo DONE! echo _______________________________________ __________________________________ echo.Reno, You are the MAN I ran my test for 24hr worked perfectly now I will do a search for a stop command. Thank you again, Reno and everyone who helped me James |
|