+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Dec 2007
    Location
    N. Lincolnshire, UK.
    Posts
    15

    Timer/Timeout In Command Prompt/Batch File - Not Ping

     
    Hi, I'm new to the Forum.

    I wonder, using Command Prompt, or batch files, and not using the ping command, is there an option or command I can use, e.g. a timeout (but not for Ping), to run different lines/commands after X amount of time? E.g. I write a batch file, and have several commands in it. I need command 1 to execute straight after Startup, next, I need command 2 to execute 5 minutes after command 1, etc... Is it possible to use such commands in a batch file?

    Thanx.

    P.S. I'm using Windows XP Pro. SP2.
    Last edited by Campo1988; December 24th, 2007 at 03:22 PM.

  2. #2
    Ultimate Member CujoRbd's Avatar
    Join Date
    Oct 2001
    Location
    Everywhere
    Posts
    1,050
    well you can use PING, doing so to a non-valid address, and this will create a delay in the running of commands... something like this will delay for 5 minutes:
    Code:
    PING -n 301 127.0.0.1>nul
    you can also get the W2K3 resource kit and then use the 'sleep' command. this page has a good explanation of how to.

    hth

  3. #3
    Junior Member
    Join Date
    Dec 2007
    Location
    N. Lincolnshire, UK.
    Posts
    15
    Sorry, I mean this is not about Ping. I mentioned Ping to try and explain I wanted the timeout feature, but not for Ping. I think I made things more complicated now, OK, forget about Ping.

    You say the sleep command, this is to execute a command after X amount of time, from my example command 1, command 2 above?

  4. #4
    Ultimate Member CujoRbd's Avatar
    Join Date
    Oct 2001
    Location
    Everywhere
    Posts
    1,050
    yes... sleep can do that. once you install it, type in "sleep /?" (w/out the quotes) in a command prompt and you can see all the options.

  5. #5
    Junior Member
    Join Date
    Dec 2007
    Location
    N. Lincolnshire, UK.
    Posts
    15
    Ooh, right. Thanx.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. can you control a browswer from command line batch file??
    By zskillz in forum Webmastering and Programming
    Replies: 3
    Last Post: April 18th, 2006, 07:05 PM
  2. Playing around with Command Prompt. Command that makes comp beep?
    By mjolnir1134 in forum General Tech Discussion
    Replies: 3
    Last Post: March 8th, 2005, 08:43 PM
  3. Ping batch file
    By Than in forum Networking and Internet
    Replies: 12
    Last Post: February 24th, 2004, 10:03 PM
  4. Using the "AT" command to run a batch file
    By DrDave1958 in forum Applications and Operating Systems
    Replies: 10
    Last Post: October 24th, 2003, 02:56 PM
  5. Why wont this command run in a batch file?
    By Siliconjunkie in forum Applications and Operating Systems
    Replies: 1
    Last Post: July 4th, 2003, 09:20 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews