WAITFOR.exe – Windows CMD Command


Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Wait for or send a signal. Waitfor is used to synchronize events between one or more networked computers.

Signal names cannot exceed 225 characters. Valid characters include a-z, A-Z, 0-9, the SignalName is not case-sensitive.

If the command line includes /s Computer, the signal will be broadcast only to the specified system rather than all the computers across the domain. On large domains or wide area networks this will reduce unnecessary network traffic.

To cancel WAITFOR before its timeout has been reached, either launch Waitfor /si signal from a separate command-prompt or KILL the session.

You can run multiple instances of WAITFOR on a single computer, but each instance must wait for a different signal. Only one instance of WAITFOR can wait for a given signal on a given computer. Computers can only receive signals if they are in the same domain as the computer sending the signal.

Batch scripts including WAITFOR can be run as Scheduled tasks under the SYSTEM account.

Typical WAITFOR applications include waiting for large ROBOCOPY jobs to complete, restarting services across a cluster/farm, FTP or BITS downloads, compiling software builds etc.

Examples

Wait for 60 seconds or until the “simon” signal is received on the local computer:

C:\> waitfor /t 60 simon

Activate the “simon” signal on the local computer:

C:\> waitfor /s %computername% /si simon

Wait for 1 hour or until the “backupComplete” signal is received on the local computer:

C:\> waitfor /t 3600 BackupComplete

Activate the “backupComplete” signal on the computer Server64:

C:\> waitfor /s Server64 /si backupComplete

You may also like...

1 Response

  1. zortilo nrel says:

    There may be noticeably a bundle to learn about this. I assume you made certain good points in features also.

Leave a Reply

Your email address will not be published. Required fields are marked *