Ping package guide
Check if a computer answers on the network (ICMP ping).
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
- Install the package on the Device. No desktop app is needed.
- The Device account, network and firewalls must allow ping.
- The condition tries every quarter second until it gets the wanted answer or the wait ends. Each try waits up to 1 second, so the last try can end a little after the wait. A wait of
0or less makes one try. - Some computers block ping but still run their apps. A name that cannot be found counts as no answer.
- Use a test computer that you control for a successful ping.
no-such-host.invalidis a reserved name that never exists.
Shared fields
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
machine | IP address/Machine name | Stringdefault ""required | Computer name or IP address, such as host.example.com. Spaces around it are removed. |
wait | Wait for this condition (seconds) | Numberdefault 0optional | Seconds to keep trying, such as 5. |
Conditions
Ping is successful (pingSuccessful)
True when the computer answers. An answer does not prove its apps are ready.
Inputs
Uses the shared fields: machineAddress and waitTimeout.
Outputs
Boolean condition; no output variables.
Example
Choose a test computer host.example.com that answers ping. Set IP address/Machine name = host.example.com, Wait for this condition (seconds) = 5. Place the condition in a conditional step.
Expected result
The condition is true when any try gets an answer, otherwise false when the wait ends. With no-such-host.invalid it is false. A blank name is an error. A firewall can make a running computer give false.
Ping is unsuccessful (pingUnsuccessful)
True when the computer does not answer. It may still be on.
Inputs
Uses the shared fields: machineAddress and waitTimeout.
Outputs
Boolean condition; no output variables.
Example
Set IP address/Machine name = no-such-host.invalid, Wait for this condition (seconds) = 0.
Expected result
The condition is true, because the name cannot be found. For a computer that answers, it stays false unless a try fails before the wait ends. A blank name is an error.