diff options
Diffstat (limited to 'Zotlabs/Daemon/Cron_daily.php')
-rw-r--r-- | Zotlabs/Daemon/Cron_daily.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index 0f0001890..f0351fcdd 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -38,12 +38,20 @@ class Cron_daily { db_utcnow(), db_quoteinterval('30 DAY') ); + // expire any unread notifications over a year old + + q("delete from notify where seen = 0 and created < %s - INTERVAL %s", + db_utcnow(), db_quoteinterval('1 YEAR') + ); + + //update statistics in config require_once('include/statistics_fns.php'); update_channels_total_stat(); update_channels_active_halfyear_stat(); update_channels_active_monthly_stat(); update_local_posts_stat(); + update_local_comments_stat(); // expire old delivery reports @@ -80,7 +88,7 @@ class Cron_daily { call_hooks('cron_daily',datetime_convert()); - set_config('system','last_expire_day',$d2); + set_config('system','last_expire_day',intval(datetime_convert('UTC','UTC','now','d'))); /** * End Cron Daily |