I'm capturing errors, logging, and restarting as needed.
Heres a small piece of my code... But may give u a better understanding of what I'm doing. (Wrapper script, loads other scripts with Eval)
our ($lasterr, $conterr)=(0,0);
do {
logs::do(0, "Loading script: ".$cmd_path);
eval {...