#!/usr/bin/env php
<?php
// DEPRECATED!
// old cronjob-run script, just kept for backwards compatibility reasons.
// you should invoke the redaxo console with "cronjob:run" directly instead.

if (PHP_SAPI !== 'cli') {
    echo 'error: this script may only be run from CLI';
    exit(10);
}

set_time_limit(0);

// get "redaxo" dir
// do not use __DIR__ to  be compatible to lower php versions until version check in boot.php
$dir = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
chdir($dir);

$REX['REDAXO'] = true;
$REX['HTDOCS_PATH'] = '../';
$REX['BACKEND_FOLDER'] = basename($dir);

define('REX_CRONJOB_SCRIPT', true);

require $dir . '/src/core/boot.php';

require rex_path::core('packages.php');
