in reply to Cron Question

Use alarm within your script to schedule a signal, and have your $SIG{ALRM} handler clean up and exit gracefully.

$SIG{ALRM} = sub { exit; }; alarm 60 * 60 * 2;

Another option is to have your script write a pid file out someplace:

open(F, ">$wherever/myscript.pid") or warn "myscript.pid: $!\n"; print F "$$\n"; close(F); $SIG{TERM} = sub { exit; }; END { unlink "$wherever/myscript.pid"; }

And then script something like this in cron:

[ -r $wherever/myscript.pid ] && kill `cat $wherever/myscript.pid`