]> git.mxchange.org Git - friendica.git/blobdiff - include/cron.php
It is better this way
[friendica.git] / include / cron.php
index 1af63ffaaff36051b72f1b6a0af9851a3ddf2428..bac9c8a3d8827e40b678dde262aeaeedbd3e9120 100644 (file)
@@ -1,5 +1,6 @@
 <?php
-use \Friendica\Core\Config;
+
+use Friendica\Core\Config;
 
 function cron_run(&$argv, &$argc){
        global $a;
@@ -64,7 +65,7 @@ function cron_run(&$argv, &$argc){
 
        // once daily run birthday_updates and then expire in background
        $d1 = get_config('system', 'last_expire_day');
-       $d2 = intval(datetime_convert('UTC','UTC','now','d'));
+       $d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
 
        if ($d2 != intval($d1)) {
 
@@ -74,7 +75,7 @@ function cron_run(&$argv, &$argc){
 
                proc_run(PRIORITY_LOW, "include/discover_poco.php", "suggestions");
 
-               set_config('system', 'last_expire_day',$d2);
+               set_config('system', 'last_expire_day', $d2);
 
                proc_run(PRIORITY_LOW, 'include/expire.php');
 
@@ -242,10 +243,6 @@ function cron_poll_contacts($argc, $argv) {
                        } else {
                                proc_run(PRIORITY_LOW, 'include/onepoll.php', intval($contact['id']));
                        }
-
-                       if ($interval) {
-                               time_sleep_until(microtime(true) + (float) $interval);
-                       }
                }
        }
 }