當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eZContentLanguage::setCronjobMode方法代碼示例

本文整理匯總了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);
 }
開發者ID:patrickallaert,項目名稱:ezpublish-legacy-php7,代碼行數:9,代碼來源:ezcontentlanguage.php

示例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;
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:31,代碼來源:runcronjobs.php


注:本文中的eZContentLanguage::setCronjobMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。