aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron_daily.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
committerMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
commit951e9c8c4f39dd8577834d5bc501c05d80722de9 (patch)
tree6a42c6a229c7b2b3e13bc5af77a733d054242695 /Zotlabs/Daemon/Cron_daily.php
parentf94b046333c57acde493ee5dc2511acc6baca701 (diff)
parent89415e17313578eb115c441480b6e0ddfa90afef (diff)
downloadvolse-hubzilla-5.4.tar.gz
volse-hubzilla-5.4.tar.bz2
volse-hubzilla-5.4.zip
Merge branch '5.4RC'5.4
Diffstat (limited to 'Zotlabs/Daemon/Cron_daily.php')
-rw-r--r--Zotlabs/Daemon/Cron_daily.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php
index a6daad051..1983c68e6 100644
--- a/Zotlabs/Daemon/Cron_daily.php
+++ b/Zotlabs/Daemon/Cron_daily.php
@@ -6,7 +6,7 @@ use Zotlabs\Lib\Libzotdir;
class Cron_daily {
- static public function run($argc,$argv) {
+ static public function run($argc, $argv) {
logger('cron_daily: start');
@@ -15,14 +15,12 @@ class Cron_daily {
*
*/
-
Libzotdir::check_upstream_directory();
-
// Fire off the Cron_weekly process if it's the correct day.
- $d3 = intval(datetime_convert('UTC','UTC','now','N'));
- if($d3 == 7) {
+ $d3 = intval(datetime_convert('UTC', 'UTC', 'now', 'N'));
+ if ($d3 == 7) {
Master::Summon(array('Cron_weekly'));
}
@@ -53,8 +51,8 @@ class Cron_daily {
// Clean up emdedded content cache
q("DELETE FROM cache WHERE updated < %s - INTERVAL %s",
- db_utcnow(),
- db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY')
+ db_utcnow(),
+ db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
);
//update statistics in config
@@ -68,8 +66,8 @@ class Cron_daily {
// expire old delivery reports
- $keep_reports = intval(get_config('system','expire_delivery_reports'));
- if($keep_reports === 0)
+ $keep_reports = intval(get_config('system', 'expire_delivery_reports'));
+ if ($keep_reports === 0)
$keep_reports = 10;
q("delete from dreport where dreport_time < %s - INTERVAL %s",
@@ -85,13 +83,12 @@ class Cron_daily {
// Pull remote changes and push local changes.
// potential issue: how do we keep from creating an endless update loop?
- $dirmode = get_config('system','directory_mode');
+ $dirmode = get_config('system', 'directory_mode');
- if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
+ if ($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
Libzotdir::sync_directories($dirmode);
}
-
Master::Summon(array('Expire'));
Master::Summon(array('Cli_suggest'));
@@ -99,9 +96,10 @@ class Cron_daily {
z6_discover();
- call_hooks('cron_daily',datetime_convert());
+ $date = datetime_convert();
+ call_hooks('cron_daily', $date);
- set_config('system','last_expire_day',intval(datetime_convert('UTC','UTC','now','d')));
+ set_config('system', 'last_expire_day', intval(datetime_convert('UTC', 'UTC', 'now', 'd')));
/**
* End Cron Daily