JSI Tip 2079. WAITFOR.
February 24, 2000
contain WAITFOR.exe, a command that can send or WAITFOR a signal acrossthe network.
Syntax:
waitfor [-t timeout] [-s] signalname [-?]
Usage, by example:
At the completion of a backup, my server issues:
WAITFOR -S backup/complete
to signal to all waiting clients that the backup is complete. The clients, which can be running WinNT, Win2000, and Win9x, are waiting for this server signal with:
WAITFOR backup/complete
When they receive the signal, the batch file proceeds to the next statement.
Because they have not used the -t parameter, they will wait forever. If they had used the timeout, the next statement is executed at the end of the timeout, or receipt of the signal, whichever comes first.
If you have Win9x clients, keep the signal in 8.3 format.
The command is NOT case sensitive.
For Windows NT, the signal will not cross domains.
You can have many WAITFOR events on the same computer, but you can't WAITFOR the same signal in different batches.
About the Author
You May Also Like