after 10 minutes of no activity / no connection - play an alarm (make it optional, the length of time configurable and the sound/music play mp3 + wav files with 1 default one included in the app)
Forget the alarm, just kill off the old miner process if it is still around and restart. Phoenix keeps stopping for no reason and I keep losing mining time.