From 106bc16250bf7fb99a451d64783f705aa6ac212d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 10 Apr 2017 14:45:33 +0200 Subject: [statistics_reporting] Send backlogged reports in cronjob --- modules-available/statistics_reporting/hooks/cron.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules-available/statistics_reporting/hooks/cron.inc.php b/modules-available/statistics_reporting/hooks/cron.inc.php index 45f39719..afb18a23 100644 --- a/modules-available/statistics_reporting/hooks/cron.inc.php +++ b/modules-available/statistics_reporting/hooks/cron.inc.php @@ -4,7 +4,7 @@ if (RemoteReport::isReportingEnabled()) { $nextReporting = RemoteReport::getReportingTimestamp(); // It's time to generate a new report - if ($nextReporting <= time()) { + while ($nextReporting <= time()) { RemoteReport::writeNextReportingTimestamp(); $from = strtotime("-7 days", $nextReporting); @@ -21,5 +21,6 @@ if (RemoteReport::isReportingEnabled()) { } else { EventLog::info('Statistics report sent to ' . CONFIG_REPORTING_URL); } + $nextReporting = strtotime("+7 days", $nextReporting); } } \ No newline at end of file -- cgit v1.2.3-55-g7522