update_contact_birthdays();
- update_suggestions();
+ proc_run('php',"include/discover_poco.php", "suggestions");
set_config('system','last_expire_day',$d2);
+
proc_run('php','include/expire.php');
}
q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
}
+ // maximum table size in megabyte
+ $max_tablesize = intval(get_config('system','optimize_max_tablesize')) * 1000000;
+ if ($max_tablesize == 0)
+ $max_tablesize = 100 * 1000000; // Default are 100 MB
+
+ // Optimize some tables that need to be optimized
+ $r = q("SHOW TABLE STATUS");
+ foreach($r as $table) {
+
+ // Don't optimize tables that needn't to be optimized
+ if ($table["Data_free"] == 0)
+ continue;
+
+ // Don't optimize tables that are too large
+ if ($table["Data_length"] > $max_tablesize)
+ continue;
+
+ // So optimize it
+ q("OPTIMIZE TABLE `%s`", dbesc($table["Name"]));
+ }
+
set_config('system','cache_last_cleared', time());
}
if(! $interval)
$interval = ((get_config('system','delivery_interval') === false) ? 3 : intval(get_config('system','delivery_interval')));
+ // If we are using the worker we don't need a delivery interval
+ if (get_config("system", "worker"))
+ $interval = false;
+
$sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
reload_plugins();
$d = datetime_convert();
- if(! $restart)
- proc_run('php','include/cronhooks.php');
-
// Only poll from those with suitable relationships,
// and which have a polling address and ignore Diaspora since
// we are unable to match those posts with a Diaspora GUID and prevent duplicates.
}
if (array_search(__file__,get_included_files())===0){
- cron_run($_SERVER["argv"],$_SERVER["argc"]);
- killme();
+ cron_run($_SERVER["argv"],$_SERVER["argc"]);
+ killme();
}