当前位置: 首页>>代码示例>>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;未经允许,请勿转载。