- $lockpath = get_lockpath();
- if ($lockpath != '') {
- $pidfile = new pidfile($lockpath, 'cron');
- if($pidfile->is_already_running()) {
- logger("cron: Already running");
- if ($pidfile->running_time() > 9*60) {
- $pidfile->kill();
- logger("cron: killed stale process");
- // Calling a new instance
- proc_run('php','include/cron.php');
- }
- exit;
- }
- }
-
-
-