<?php
namespace wcf\data\cronjob;
use wcf\data\cronjob\log\CronjobLogEditor;
+use wcf\data\user\User;
use wcf\data\AbstractDatabaseObjectAction;
use wcf\data\IToggleAction;
use wcf\system\cronjob\CronjobScheduler;
* Executes open cronjobs.
*/
public function executeCronjobs() {
+ // switch session owner to 'system' during execution of cronjobs
+ WCF::getSession()->changeUser(new User(null, array('userID' => 0, 'username' => 'System')), true);
+ WCF::getSession()->disableUpdate();
+
CronjobScheduler::getInstance()->executeCronjobs();
}
}