summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apis/cron.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apis/cron.inc.php b/apis/cron.inc.php
index 0bcd2490..cf96ac29 100644
--- a/apis/cron.inc.php
+++ b/apis/cron.inc.php
@@ -52,6 +52,11 @@ foreach (Hook::load('cron') as $hook) {
}
$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);
}