You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warn if the lockfile for system cron is older than a day
We want to avoid deadlock situations and right now if there is a process
running with the same PID that is not our process (e.g. after a reboot)
we might be waiting forever to run the cron again. So to make this
transparent to the user, we at least post a warning into the logfile.
if($conf['log_priority'] <= LOGLEVEL_WARN) print @date('d.m.Y-H:i').' - WARNING - The cron lock file is older than one day.' . "\n";
42
+
exit;
43
+
}
44
+
45
+
// Check if the process id we have in the lock file is still present
46
+
$pid = trim(file_get_contents($lockFile));
38
47
if(preg_match('/^[0-9]+$/', $pid)) {
39
48
if(file_exists('/proc/' . $pid)) {
40
49
if($conf['log_priority'] <= LOGLEVEL_WARN) print @date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid ' . $pid . '.' . "\n";
0 commit comments