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

Author Topic: unsure how to execute this timed batch  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

haxxx

    Topic Starter


    Greenhorn

    unsure how to execute this timed batch
    « on: February 10, 2010, 12:14:54 AM »
    I plan to place a shortcut to my streamrecorder in my startup folder so it runs  when windows  starts. how would i structure my batch so it runs when windows starts but only if its between 7:00 pm  and 9:00 pm. I don't want to use scheduler because if there'a a power cut at say 6:58 and power returns at 7:02 i want my stream recorder to still kick in. Any ideas guys. runnin xp by the way.


    @echo off
    start streamrecorder

    Salmon Trout

    • Guest
    Re: unsure how to execute this timed batch
    « Reply #1 on: February 10, 2010, 12:19:03 AM »
    check the value of %time% at startup

    haxxx

      Topic Starter


      Greenhorn

      Re: unsure how to execute this timed batch
      « Reply #2 on: February 10, 2010, 01:02:13 AM »
      baby language plz, i just started learning batch files a few days ago

      Salmon Trout

      • Guest
      Re: unsure how to execute this timed batch
      « Reply #3 on: February 10, 2010, 11:15:01 AM »
      Please start a command window and type the following at the prompt

      echo %time%


      and tell us the result.


      we need to know your system time format (12 hour with AM/PM, or 24 hour)

      haxxx

        Topic Starter


        Greenhorn

        Re: unsure how to execute this timed batch
        « Reply #4 on: February 16, 2010, 11:57:00 PM »
        Sorry for the delay in responding, situations beyond my control.
        Here's the info u asked for 1:53:45.32. I use the 12 hour clock format.

        Salmon Trout

        • Guest
        Re: unsure how to execute this timed batch
        « Reply #5 on: February 17, 2010, 12:11:41 AM »
        Here's the info u asked for 1:53:45.32. I use the 12 hour clock format.

        no 'am' or 'pm'?


        haxxx

          Topic Starter


          Greenhorn

          Re: unsure how to execute this timed batch
          « Reply #6 on: February 17, 2010, 06:30:02 PM »
          ok i re-entered the echo %time% at 8:28 pm, i got
          20:26:22.00

          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: unsure how to execute this timed batch
          « Reply #7 on: February 17, 2010, 07:06:38 PM »
          So, this is what you want.

          @echo off
          set tme=%time::=%
          if %tme% GEQ 190000.00 if %tme% LEQ 210000.00 start streamrecorder
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          haxxx

            Topic Starter


            Greenhorn

            Re: unsure how to execute this timed batch
            « Reply #8 on: February 18, 2010, 10:13:10 PM »
            thanks guys will give it a shot.

            Haxxx

            Helpmeh



              Guru

            • Roar.
            • Thanked: 123
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 8
            Re: unsure how to execute this timed batch
            « Reply #9 on: February 19, 2010, 04:23:32 AM »
            If it doesn't work, remove the .00 from the if commands.
            Where's MagicSpeed?
            Quote from: 'matt'
            He's playing a game called IRL. Great graphics, *censored* gameplay.