A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label sleep. Show all posts
Showing posts with label sleep. Show all posts

Ping a host, then sleep and loop in Windows

@echo off
for /L %%a in (1,1,2016) do (
date /t
time /t
ping -n 30 yahoo.co.uk
ping localhost -n 360 > nul
)

Pipe this into a file to test your internet connection.
It pings yahoo.co.uk 30 times, then sleeps for 5 minutes.
It repeats 2016 times; That is one week.

Poor man's sleep command for Windows batch files

for roughly 20 seconds wait:

ping 127.0.0.1 -n 20 > nul

Putting MySQL to sleep

Use

select sleep(30);

You can call this from a script and then run

show full processlist;

on the server to verify that the script is hitting it.