TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    (Windows) Pausing for 5 seconds during batch script?

    General Discussion
    1
    2
    101
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cheesewiz_man
      last edited by

      Having a dickens of a time enforcing a pause in the batch file.

      This:

      @echo off
      taskkill /F /FI "WindowTitle eq OldTask*" /T

      ping -n6 127.0.0.1 > nul 2> nul
      ping -n6 127.0.0.1
      timeout /T 5 /NOBREAK

      start "Starting New Task..." "C:\newtask.exe"

      Works fine (pauses 15 seconds) when I launch directly from the windows GUI, but when I trigger it, it goes straight from the taskkill to the start without pausing.

      ping and timeout are both stock windows apps (no cygwin or anything present).

      Any thoughts?

      1 Reply Last reply Reply Quote 0
      • C
        cheesewiz_man
        last edited by

        Ah. "ping -n 6 localhost < nul" works.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post