Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question about the Sleep method

411 views
Skip to first unread message

Chris ( Val )

unread,
Mar 28, 2004, 9:09:47 AM3/28/04
to
Hi everyone.

I have been trying to find out what the maximum
limit for the Sleep() method is.

For example:

Wscript.Sleep( SomeMaxNumber )

I have looked, but am finding it very difficult
to find.

Anyone know of the limit ?, or point me to the documentation
where it is stated ?

I need to provide some sort of delay(approx 30 to 60 mins),
but I have a feeling that the Sleep() method may not allow
that long, but I just can't find anywhere where it says so.

If this is out of the question for the Sleep() method, then
is there a better way ?

Thanks.
Chris Val


Message has been deleted

Austin M. Horst

unread,
Mar 28, 2004, 10:01:09 AM3/28/04
to
The maximum sleep time depends on the Scripting Host version.
You will receive the following error if the number exceeds the limit:
Error: Overflow: 'Wscript.Sleep'
Code: 800A0006
Source: Microsoft VBScript runtime error

Be safe, if you must go beyond 2,000,000,000 milliseconds, use a second sleep statement.
Wscript.Sleep 2000000000
Wscript.Sleep 2000000000


Austin M. Horst

Chris ( Val )

unread,
Mar 28, 2004, 10:57:31 AM3/28/04
to
Thanks for the excellent replies everyone :-).

Btw, in what documentation did you find this ?
I couldn't find it at all.

Cheers.
Chris Val


"Chris ( Val )" <chri...@bigpond.com.au> wrote in message
news:c46mb6$2evgmu$1...@ID-110726.news.uni-berlin.de...

Message has been deleted

Chris ( Val )

unread,
Mar 29, 2004, 7:53:03 AM3/29/04
to
Thanks Christoph.

Cheers.
Chris Val


"Christoph Basedau" <e_t...@hotmail.com> wrote in message
news:40676b2e$0$17763$9b4e...@newsread2.arcor-online.net...


| 28.03.2004 17:57, Chris ( Val ) schrieb:
| > Thanks for the excellent replies everyone :-).
| >
| > Btw, in what documentation did you find this ?
| > I couldn't find it at all.
|

| Most VBS and WSH-methods receiving (long) int-inparams
| have this limit. It's document in the script-help
| (script56.CHM).
| Have a look at the VBScript-datatype reference.
| If its installed on your local computer and "C:\Script56.CHM"
| is the local path, then type:
|
| mk:@MSITStore:C:\Script56.CHM::/html/vbsdatatype.htm
|
| into the run-box, press enter (modify local path, if necessary) or goto:
| http://msdn.microsoft.com/library/en-us/script56/html/vbsDataType.asp


|
| > | I have been trying to find out what the maximum
| > | limit for the Sleep() method is.
| > |
| > | For example:
| > |
| > | Wscript.Sleep( SomeMaxNumber )
|
|

| --
| Gruesse, Christoph


0 new messages