public static function execute($parameter = '', $generation = 0) {
global $a;
- require_once 'include/datetime.php';
-
// Poll contacts with specific parameters
if (!empty($parameter)) {
self::pollContacts($parameter, $generation);
logger('cron: start');
+ // Fork the cron jobs in separate parts to avoid problems when one of them is crashing
+ Addon::forkHooks($a->queue['priority'], "cron");
+
// run queue delivery process in the background
Worker::add(PRIORITY_NEGLIGIBLE, "Queue");