+ // Don't check this stuff if the function is called by the poller
+ if (App::callstack() != "poller_run") {
+ if (App::maxload_reached())
+ return;
+ if (App::is_already_running('cronhooks', 'include/cronhooks.php', 1140))
+ return;
+ }
+
+ $last = get_config('system','last_cronhook');
+
+ $poll_interval = intval(get_config('system','cronhook_interval'));
+ if(! $poll_interval)
+ $poll_interval = 9;
+
+ if($last) {
+ $next = $last + ($poll_interval * 60);
+ if($next > time()) {
+ logger('cronhook intervall not reached');
+ return;
+ }
+ }
+