]> git.mxchange.org Git - friendica.git/blobdiff - include/cronhooks.php
The repair option is added to the settings
[friendica.git] / include / cronhooks.php
index 0ba453555ce63c580622d922ed3feee27438e329..26cab3cf92a86a0c3a2b566f3d24dc56ed7e356c 100644 (file)
@@ -30,17 +30,17 @@ function cronhooks_run(&$argv, &$argc){
        if(function_exists('sys_getloadavg')) {
                $load = sys_getloadavg();
                if(intval($load[0]) > $maxsysload) {
-                       logger('system: load ' . $load . ' too high. Poller deferred to next scheduled run.');
+                       logger('system: load ' . $load[0] . ' too high. Cronhooks deferred to next scheduled run.');
                        return;
                }
        }
 
-       $lockpath = get_config('system','lockpath');
+       $lockpath = get_lockpath();
        if ($lockpath != '') {
                $pidfile = new pidfile($lockpath, 'cronhooks');
                if($pidfile->is_already_running()) {
                        logger("cronhooks: Already running");
-                       if ($pidfile->running_time() > 9*60) {
+                       if ($pidfile->running_time() > 19*60) {
                                 $pidfile->kill();
                                 logger("cronhooks: killed stale process");
                                // Calling a new instance
@@ -66,6 +66,6 @@ function cronhooks_run(&$argv, &$argc){
 }
 
 if (array_search(__file__,get_included_files())===0){
-  cronhooks_run($argv,$argc);
+  cronhooks_run($_SERVER["argv"],$_SERVER["argc"]);
   killme();
 }