本文整理汇总了PHP中eZContentLanguage::setCronjobMode方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentLanguage::setCronjobMode方法的具体用法?PHP eZContentLanguage::setCronjobMode怎么用?PHP eZContentLanguage::setCronjobMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentLanguage
的用法示例。
在下文中一共展示了eZContentLanguage::setCronjobMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clearCronjobMode
/**
* Switches off the cronjob mode.
*
* \see eZContentLanguage::setCronjobMode()
*/
static function clearCronjobMode()
{
eZContentLanguage::setCronjobMode(false);
}
示例2: MaxScriptExecutionTime
*/
/* 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;