-
December 24th, 2007, 03:11 PM #1Junior 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.
-
December 24th, 2007, 06:58 PM #2
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:
you can also get the W2K3 resource kit and then use the 'sleep' command. this page has a good explanation of how to.Code:PING -n 301 127.0.0.1>nul
hth
-
December 26th, 2007, 05:59 PM #3Junior 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?
-
December 28th, 2007, 01:45 AM #4
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.
-
December 31st, 2007, 03:50 PM #5Junior 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
-
can you control a browswer from command line batch file??
By zskillz in forum Webmastering and ProgrammingReplies: 3Last Post: April 18th, 2006, 07:05 PM -
Playing around with Command Prompt. Command that makes comp beep?
By mjolnir1134 in forum General Tech DiscussionReplies: 3Last Post: March 8th, 2005, 08:43 PM -
Ping batch file
By Than in forum Networking and InternetReplies: 12Last Post: February 24th, 2004, 10:03 PM -
Using the "AT" command to run a batch file
By DrDave1958 in forum Applications and Operating SystemsReplies: 10Last Post: October 24th, 2003, 02:56 PM -
Why wont this command run in a batch file?
By Siliconjunkie in forum Applications and Operating SystemsReplies: 1Last Post: July 4th, 2003, 09:20 AM



LinkBack URL
About LinkBacks



Reply With Quote

People like DooG and I are older farts. Hell, he can't even post unless he's asleep. The country is in your hands, Bingo . . .
Who Pays Corporate Income Taxes ?