Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: just learning  (Read 19068 times)

0 Members and 1 Guest are viewing this topic.

Dias de verano

  • Guest
Re: just learning
« Reply #15 on: April 07, 2009, 02:03:28 AM »
you can download the Windows 2000 resource kit utility sleep.exe

http://www.dynawell.com/download/reskit/microsoft/win2000/sleep.zip

Unzip the exe and put it somewhere on your PATH or in the same directory as the batch

syntax:

sleep N

where N is the number of seconds

so sleep 900 will wait 900 seconds (15 minutes)

olo131

    Topic Starter


    Rookie

    Re: just learning
    « Reply #16 on: April 07, 2009, 11:02:15 AM »
    It is funny I was just looking that up and I'm trying that now.

    I'll post my results

    olo131

      Topic Starter


      Rookie

      Re: just learning
      « Reply #17 on: April 07, 2009, 11:14:54 AM »
      I get an error

      C:\Program Files\Windows Resource Kits\Tools\sleep.exe is not a valid Win32 application



      I was also told to try this

      PING -n 61 127.0.0.1>nul as s pause is this an OK option?

      James

      Dias de verano

      • Guest
      Re: just learning
      « Reply #18 on: April 07, 2009, 11:27:26 AM »
      I get an error

      C:\Program Files\Windows Resource Kits\Tools\sleep.exe is not a valid Win32 application

      I was also told to try this

      PING -n 61 127.0.0.1>nul as s pause is this an OK option?

      James

      What version of Windows are you using? Works fine on Windows 2000, XP. When did you last do a virus check? Is your antivirus up to date? because that message can be a sign of a previously existing infection.

      Anyway the ping command you showed will wait for 1 minute (you add 1 to the number of seconds and put that number after ping -n)




      olo131

        Topic Starter


        Rookie

        Re: just learning
        « Reply #19 on: April 07, 2009, 11:33:19 AM »
        I'm using XP But I have had a virus in in the past Thought I got rid of it

        I thought the -n61 was the time of the delay but I much rather use the sleep option

        James

        Dias de verano

        • Guest
        Re: just learning
        « Reply #20 on: April 07, 2009, 11:46:46 AM »

        I thought the -n61 was the time of the delay but I much rather use the sleep option


        -n 61 means delay 60 seconds. -n 901 means delay 900 seconds.


        olo131

          Topic Starter


          Rookie

          Re: just learning
          « Reply #21 on: April 07, 2009, 04:44:48 PM »
          thank you for you help

          I went with the PING -n 61 127.0.0.1>nul command It was just simple.

          thanks again
          James


          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: just learning
          « Reply #22 on: April 07, 2009, 05:19:40 PM »
          -n 61 means delay 60 seconds. -n 901 means delay 900 seconds.



          But -n 10 -w 1000 will delay for 10 seconds (-w is the timeout).
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          olo131

            Topic Starter


            Rookie

            Re: just learning
            « Reply #23 on: April 07, 2009, 05:43:25 PM »
            now this sound useful

            If I want my command to run for say 24hr and test every 30min it would look like this

            PING -n 1801 -w 86401 127.0.0.1>nul

            Correct??

            Helpmeh



              Guru

            • Roar.
            • Thanked: 123
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 8
            Re: just learning
            « Reply #24 on: April 07, 2009, 06:04:02 PM »
            now this sound useful

            If I want my command to run for say 24hr and test every 30min it would look like this

            PING -n 1801 -w 86401 127.0.0.1>nul

            Correct??


            -w is the timeout in miliseconds...
            -n is the amount of times. If you use -w 1000, you don't need to add the extra 1 at the end.

            Here is what I think you want to do...
            Code: [Select]
            @echo off
            :loop
            ping localhost -n 1800 -w 1000 > nul
            COMMANDHERE
            goto loop
            Where's MagicSpeed?
            Quote from: 'matt'
            He's playing a game called IRL. Great graphics, *censored* gameplay.

            olo131

              Topic Starter


              Rookie

              Re: just learning
              « Reply #25 on: April 07, 2009, 06:29:35 PM »
              Ok let's try this because I think your trying to help me

              Here is my command I use for a network test.

              @echo off
              :A
              echo.
              echo CREATED FOR KNOLOGY SPEED TEST        by: OLO 131
              :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.
              PING -n 1801 -w 86400001 127.0.0.1>nul
              goto B

              SO.....will this work for a 24hr test testing every 30min and then stopping but not closing the open window so I can save the test??
              I have not run this test I just want you to look at it and see if the command fits

              James

              Helpmeh



                Guru

              • Roar.
              • Thanked: 123
                • Yes
                • Yes
              • Computer: Specs
              • Experience: Familiar
              • OS: Windows 8
              Re: just learning
              « Reply #26 on: April 07, 2009, 06:52:02 PM »
              OK let's try this because I think your trying to help me

              Here is my command I use for a network test.

              @echo off
              :A
              echo.
              echo CREATED FOR KNOLOGY SPEED TEST        by: OLO 131
              :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.
              PING -n 1801 -w 86400001 127.0.0.1>nul
              goto B

              SO.....will this work for a 24hr test testing every 30min and then stopping but not closing the open window so I can save the test??
              I have not run this test I just want you to look at it and see if the command fits

              James
              I always put where I'm pinging right after PING (I'm not sure it works otherwise)...and I would put a CLS between PING and GOTO B. But I reccommend you look in my previous post.

              -w is the timeout in milliseconds...
              -n is the amount of times. If you use -w 1000, you don't need to add the extra 1 at the end.

              Here is what I think you want to do...
              Code: [Select]
              @echo off
              :loop
              ping localhost -n 1800 -w 1000 > nul
              COMMANDHERE
              goto loop

              The above should loop every 30 minutes.
              Where's MagicSpeed?
              Quote from: 'matt'
              He's playing a game called IRL. Great graphics, *censored* gameplay.

              olo131

                Topic Starter


                Rookie

                Re: just learning
                « Reply #27 on: April 07, 2009, 07:48:47 PM »
                I will give it a try

                Thanks
                James

                Reno



                  Hopeful
                • Thanked: 32
                  Re: just learning
                  « Reply #28 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.
                  if you just need to delay for 4-5 seconds once in a while, i would have suggest you using ping instead of vbs sleep.

                  the code:
                  >$sleep.vbs echo wsh.sleep 900000
                  cscript//nologo $sleep.vbs


                  900000 is in miliseconds, or 900seconds=15minutes.

                  Dias de verano

                  • Guest
                  Re: just learning
                  « Reply #29 on: April 08, 2009, 12:27:39 AM »
                  olo131, you need to investigate why the sleep command is not working.