aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron_daily.php
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /Zotlabs/Daemon/Cron_daily.php
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
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