To prevent collisions, you can have the cronjob store its PID in a temp file, then, on the next invocation, check if the temp file exists, read it into $pid and kill 0, $pid. That will tell you if the old process is still alive, in which case you can exit or sleep for a while.