Skip to main content

Ping in interval on Windows with commandline

How do you ping in interval in Windows ? This is how you do it. Just type this in Start => Run

cmd /c "for /L %i in (1,0,2) do @ping 1.2.3.4 > nul & sleep 10"

This would ping an address in interval of 10 seconds without echo the results but if you do then use this next command

cmd /c "for /L %i in (1,0,2) do @ping 1.2.3.4 & sleep 10"

Notice the '>nul' is exclude.

Happy trying and now you don't need all those fancy utilities.

Comments

Popular posts from this blog

SQL Tips : EXTRACT function as alternative to TO_CHAR

You want to create a sql to list data group in year (datetime datatype). Example as below : The table is smp.SC03F_TEMP with over 10 million rows. Usually, if there something deals with date we will use to_char function. As an alternative, you can use extract function to extract certain part of the date. In belows example, we extract the year of a column. As we can see the time taken is almost half for 10 million rows. Happy trying. select count(*) from smp.SC03F_TEMP; -- 10,866,921 records select count(*), to_char(A.SC03TARIKH, 'YYYY') from smp.SC03F_TEMP a group by to_char(A.SC03TARIKH, 'YYYY'); -- Time taken 54sec