Easiest Way to have Netwatch Ping More than Once

I found the variable. Here is what I have:
:local i value=0;
:while (($i <10) && ([/ping address=x.x.x.x interval=3 count=1]=0)) do={:set i value=($i+1)} ;
:if ($i=10) do={
:log info message=“Warning: 10 unsuccessful pings to IP x.x.x.x.”
:if ([/system resource get uptime] > 5m) do={
/tool e-mail send to=“tony@xxxx.com” subject=“down”;
}
}It works.

The “/system resource get uptime” variable prevents the script from sending the email upon router reboot. Let’s say you have 20 devices being monitored. Every time you reboot the router you would get 20 emails. That’s not fun. Setting this variable to more than 5 minutes eliminates the emails on startup.

Now if I could only ping 5 times and spread it out over 2 minutes, I would be happy!

Can you ping at intervals of 30 seconds? If so, how, and, does this hurt router performance?

Change the interval in 24 seconds and change the “10” to 5, this will spread the 5 pings in 2 minutes.

I tried. Once you get over 9 it doesn’t work. Is there a special way to enter 24 seconds?

Also, does this bog down any resources and slow down the router?

Thanks.

That’s why don’t put it on the netwatch.
Put the script on System>Scripts and create a scheduler for it to run every 2 minutes.
You define the interval of ping on the script by changing interval=3 to interval=24. You define the number of ping on the ($i <10) and ($i=10) change them to 5.

is it possible to use

local i

in more than one script at the same time?

LOCAL i