Piwik\Plugins\CoreAdminHome\API::runCronArchiving PHP Method

runCronArchiving() public method

Initiates cron archiving via web request.
public runCronArchiving ( )
    public function runCronArchiving()
    {
        Piwik::checkUserHasSuperUserAccess();
        // HTTP request: logs needs to be dumped in the HTTP response (on top of existing log destinations)
        /** @var \Monolog\Logger $logger */
        $logger = StaticContainer::get('Psr\\Log\\LoggerInterface');
        $handler = new StreamHandler('php://output', Logger::INFO);
        $handler->setFormatter(StaticContainer::get('Piwik\\Plugins\\Monolog\\Formatter\\LineMessageFormatter'));
        $logger->pushHandler($handler);
        $archiver = new CronArchive();
        $archiver->main();
    }