/** * Switches off the cronjob mode. * * \see eZContentLanguage::setCronjobMode() */ static function clearCronjobMode() { eZContentLanguage::setCronjobMode(false); }
*/ /* No more than one instance of a cronjob script can be run at any given time. If a script uses more time than the configured MaxScriptExecutionTime (see cronjob.ini), the next instance of it will try to gracefully steal the cronjob script mutex. If the process has been running for more than two times MaxScriptExecutionTime, the original process will be killed. */ /* Set a default time zone if none is given. The time zone can be overridden in config.php or php.ini. */ if (!ini_get("date.timezone")) { date_default_timezone_set("UTC"); } require_once 'autoload.php'; require_once 'kernel/common/i18n.php'; eZContentLanguage::setCronjobMode(); $cli = eZCLI::instance(); $script = eZScript::instance(array('debug-message' => '', 'use-session' => true, 'use-modules' => true, 'use-extensions' => true)); $script->startup(); $webOutput = $cli->isWebOutput(); function help() { $argv = $_SERVER['argv']; $cli = eZCLI::instance(); $cli->output("Usage: " . $argv[0] . " [OPTION]... [PART]\n" . "Executes eZ Publish cronjobs.\n" . "\n" . "General options:\n" . " -h,--help display this help and exit \n" . " -q,--quiet do not give any output except when errors occur\n" . " -s,--siteaccess selected siteaccess for operations, if not specified default siteaccess is used\n" . " -d,--debug display debug output at end of execution\n" . " -c,--colors display output using ANSI colors\n" . " --sql display sql queries (must be used in conjunction with debug option)\n" . " --logfiles create log files\n" . " --no-logfiles do not create log files (default)\n" . " --list list all cronjobs parts and the scripts contained by each one\n" . " --no-colors do not use ANSI coloring (default)\n"); } function changeSiteAccessSetting(&$siteaccess, $optionData) { $cli = eZCLI::instance(); if (file_exists('settings/siteaccess/' . $optionData)) { $siteaccess = $optionData;