diff options
author | redmatrix <git@macgirvin.com> | 2016-06-19 19:12:33 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-19 19:12:33 -0700 |
commit | fb61c4fb3497d3751bb43f12cadee9e9c7776be9 (patch) | |
tree | 604989e10424456783fccff1fccc5b14da26db7f /Zotlabs/Daemon/Cron_weekly.php | |
parent | bfaabfb7b5ff639992a01b0e1fc374cd43d536e9 (diff) | |
parent | 4578649f758e65f1d87ebb98da7cd891d0b90d0d (diff) | |
download | volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.tar.gz volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.tar.bz2 volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.zip |
Merge branch '1.8RC'
Diffstat (limited to 'Zotlabs/Daemon/Cron_weekly.php')
-rw-r--r-- | Zotlabs/Daemon/Cron_weekly.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Cron_weekly.php b/Zotlabs/Daemon/Cron_weekly.php new file mode 100644 index 000000000..1d8420947 --- /dev/null +++ b/Zotlabs/Daemon/Cron_weekly.php @@ -0,0 +1,49 @@ +<?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 |