Skip navigation

JSI Tip 2079. WAITFOR.

contain WAITFOR.exe, a command that can send or WAITFOR a signal across the network.


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 <seconds> 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.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.