summaryrefslogtreecommitdiffstats
path: root/apis/cron.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'apis/cron.inc.php')
-rw-r--r--apis/cron.inc.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apis/cron.inc.php b/apis/cron.inc.php
index a0042e61..cf96ac29 100644
--- a/apis/cron.inc.php
+++ b/apis/cron.inc.php
@@ -50,8 +50,13 @@ foreach (Hook::load('cron') as $hook) {
continue;
}
}
- $value = $hook . '|' . time();
+ $value = $hook->moduleId . '|' . time();
Property::addToList(CRON_KEY_STATUS, $value, 1800);
- handleModule($hook->file);
+ try {
+ handleModule($hook->file);
+ } catch (Exception $e) {
+ // Logging
+ EventLog::failure('Cronjob for module ' . $hook->moduleId . ' has crashed. Check the php or web server error log.', $e->toString());
+ }
Property::removeFromList(CRON_KEY_STATUS, $value);
}