Jeg ville prøve at Keep It Simple S..... og bruge en simpel fillåsningsproces som denne øverst i dit eksisterende cron-script.
$fp = fopen("/tmp/my_cron_lock.txt", "r+");
if ( ! flock($fp, LOCK_EX)) {
// other cron is overrunning so
// I'll get restarted in 3 mins
// so I will let other job finish
fclose($fp);
exit;
}
// existing script
// free the lock,
// although this will happen automatically when script terminates
fclose($fp);
?>