summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting/hooks/cron.inc.php
diff options
context:
space:
mode:
authorChristian Hofmaier2017-04-12 14:30:18 +0200
committerChristian Hofmaier2017-04-12 14:30:18 +0200
commit9f27c7cdeb1df2f9c42373f419c6621d4faa71ca (patch)
treee55c6e1d95685df2117401e97f946b962f4e0f47 /modules-available/statistics_reporting/hooks/cron.inc.php
parent[permissionmanager] changed description to tooltips (diff)
parent[rebootcontrol] New module for shutting down and rebooting clients (diff)
downloadslx-admin-9f27c7cdeb1df2f9c42373f419c6621d4faa71ca.tar.gz
slx-admin-9f27c7cdeb1df2f9c42373f419c6621d4faa71ca.tar.xz
slx-admin-9f27c7cdeb1df2f9c42373f419c6621d4faa71ca.zip
Merge branches 'master' and 'permission-manager' of git.openslx.org:openslx-ng/slx-admin into permission-manager
Diffstat (limited to 'modules-available/statistics_reporting/hooks/cron.inc.php')
-rw-r--r--modules-available/statistics_reporting/hooks/cron.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics_reporting/hooks/cron.inc.php b/modules-available/statistics_reporting/hooks/cron.inc.php
index a48f74c2..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);
@@ -18,6 +18,9 @@ if (RemoteReport::isReportingEnabled()) {
if ($code != 200) {
EventLog::warning("Statistics Reporting failed: " . $code, $result);
+ } else {
+ EventLog::info('Statistics report sent to ' . CONFIG_REPORTING_URL);
}
+ $nextReporting = strtotime("+7 days", $nextReporting);
}
} \ No newline at end of file