[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

sleep command in batch script

Posted on 2004-11-10
3
Medium Priority
?
6,689 Views
Last Modified: 2008-11-12
I have a batch script that automatically starts/stops my sprint business connection software on my computer and i want to put a "sleep" command in it to give it some time (30 seconds) in between terminating the program and restarting it, but i dont know the specific code to use.  And i dont want to have to hit a key after the sleep part to start the service back up, i just want it to do it by itself.   Thanks
0
Comment
Question by:dlev15
3 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 12548300
Hi dlev15,
Sleep uses the following syntax:

sleep (Time)

Parameter
Time
Specifies the number of seconds to pause.

Cheers!
0
 

Author Comment

by:dlev15
ID: 12548329
every time i do that it says 'sleep' is not recognized as either an internal or external command am i doing something wrong?
0
 
LVL 104

Accepted Solution

by:
Sembee earned 1500 total points
ID: 12549253
sleep isn't a command on Windows XP or 2000 clients. You will have to use another trick.
What I do is use a ping...

rem Pause for five minutes
ping -n 300 127.0.0.1>nul

Adjust the value "300" to be the number of seconds that you want to pause for.

Simon.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question