Jump to content

SLEEP — Batch util sleeps until event occurrence


Recommended Posts

Hi this is my first post here...

After lots of reading and stuff, i started my own unattended winXP SP2 DVD's

but i noticed that working with the WPI interface some programs did not got installed due to a setup.exe that already is processing and that causes errors in the final result of your installation.

After 10 minutes of searching i found a great tool to make it all install without any double checking after timing the install of each software that was missing.

You need to use the command SLEEP for 180

that means wait 180 seconds = 3 minutes before you execute the next line

that made all the difference in the world for me, and use the command SLEEP /? in your command window ( cmd.exe in RUN) to see what this fine tool can do for you, it's small but capable to keep my hair color the way it is and not grey ;)

SLEEP — Batch util sleeps until event occurrence.

* * * * *

[added 1998-03-21, updated 2005-04-10]

A very flexible command line tool for scheduling events; intended for batch files.

From the docs:

The possible events are: FOR a length of time, TILL a certain time, a question ASKed of the user, certain FILESPECS appear or disappear, the UPS is active, or a SCHEDuled event. Commands can be combined. Sleep is DOS, DesqView (uses DV System Memory), OS/2, and Windows aware.

Sleep will accept an indirect command file. Multiple lines can be used and command files can be nested. The resulting command line must be under 16K.

Sleep takes up to 100 filespecs, with paths and wildcards. Sleep will exit when any of these filespecs is created (+) or deleted (-). If also prefixed by "&", the conditions for those filespecs are ANDed rather than ORed.

Serial and parallel port monitoring: Sleep outputs a byte to the port's control register, then monitors the port's status register, looking for the presence (+) or absence (-) of a bit or bits.

Scheduled events can stored in a file which contains one line per event. Sleep returns the error level of an event when it occurs.

Sleep can also be called to return an error level based on the date or time.

The cursor keys can be used to modify time remaining.

Usage:

INDIRECT COMMAND FILE.Sleep "@"<file>

FOR syntax............Sleep for [[hh":"]mm":"]ss

TILL syntax...........Sleep till [[hh":"]mm":"]ss

ASK syntax............Sleep ask '<prompt string>' <responses>

FILESPECS syntax......Sleep ["&"]"+"|"-"<filespec> ...

PAR and SER syntax....Sleep par|ser <port adr> <out> "+"<in> "-"<in>

SCHED syntax..........Sleep sched <file>

No documentation - type SLEEP /? for extended help screens.

Author: John R. Souvestre (1997).

Sleep

direct download click here

Unpack it and copy/move it to $OEM$\$$\System32\

Tested on WinXP Pro SP2

Note this is a different tool then the one on this page

They are not the same

I want to thank everyone involved here for their great help/answers that we all can find at msfn.org

TWO thumbs UP

SLEEP.EXE

Link to comment
Share on other sites


yes i agree its an invaluable tool :) i use it constantly in my start.bat (since i cant get WPI to work and Xplode takes too long to code) i use it to kill nag screens and stuff. stupid programs still pop up message boxes even when u tell them to be quiet! so all i do it sleep 5 kill setup.exe :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...