Ping command on iPad
Ouch - do realize that you will be working against two factors.


If the ping app is in the foreground - it's a easy project.
For it to run in the background (where it will do you any good) it has to play by the background task API - all of which are designed to prevent the usage of the CPU and preventing the WiFi from dropping. Even if it worked a while, it would be a bug and likely to break every time Apple updates it's OS.


Your battery life will be horrible - but that's your call since your network interruption might be more pain than a ten hour runtime. I have a solution that will work out of the box.

Get yourself a mapping app like Runmeter. It can be configured to upload a map to the internet every 5 minutes. It can also monitor a twitter stream, so you could set up a bot account to push updates more rapidly if the mapping alone didn't keep your iPad from detecting the WiFi as idle.