aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron_weekly.php
diff options
context:
space:
mode:
authorWave <wave72@users.noreply.github.com>2016-07-22 10:55:02 +0200
committerGitHub <noreply@github.com>2016-07-22 10:55:02 +0200
commit744ad84714fe0f7a3d90250a4ff02dc4327b9061 (patch)
tree595fb74ec9ea0bc7130d18bd7993d719a222d343 /Zotlabs/Daemon/Cron_weekly.php
parentc38c79d71c8ef70ef649f83e322f1984b75ee2dd (diff)
parent7d897a3f03bd57ed556433eb84a41963ba44e02e (diff)
downloadvolse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.tar.gz
volse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.tar.bz2
volse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.zip
Merge pull request #6 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Daemon/Cron_weekly.php')
-rw-r--r--Zotlabs/Daemon/Cron_weekly.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Cron_weekly.php b/Zotlabs/Daemon/Cron_weekly.php
new file mode 100644
index 000000000..ba4b67ff5
--- /dev/null
+++ b/Zotlabs/Daemon/Cron_weekly.php
@@ -0,0 +1,48 @@
+<?php
+
+namespace Zotlabs\Daemon;
+
+class Cron_weekly {
+
+ static public function run($argc,$argv) {
+
+ /**
+ * Cron Weekly
+ *
+ * Actions in the following block are executed once per day only on Sunday (once per week).
+ *
+ */
+
+ call_hooks('cron_weekly',datetime_convert());
+
+ z_check_cert();
+
+ require_once('include/hubloc.php');
+ prune_hub_reinstalls();
+
+ mark_orphan_hubsxchans();
+
+
+ // get rid of really old poco records
+
+ q("delete from xlink where xlink_updated < %s - INTERVAL %s and xlink_static = 0 ",
+ db_utcnow(), db_quoteinterval('14 DAY')
+ );
+
+ $dirmode = intval(get_config('system','directory_mode'));
+ if($dirmode === DIRECTORY_MODE_SECONDARY || $dirmode === DIRECTORY_MODE_PRIMARY) {
+ logger('regdir: ' . print_r(z_fetch_url(get_directory_primary() . '/regdir?f=&url=' . urlencode(z_root()) . '&realm=' . urlencode(get_directory_realm())),true));
+ }
+
+ // Check for dead sites
+ Master::Summon(array('Checksites'));
+
+ // update searchable doc indexes
+ Master::Summon(array('Importdoc'));
+
+ /**
+ * End Cron Weekly
+ */
+
+ }
+} \ No newline at end of file