当前位置: 首页>>代码示例>>PHP>>正文


PHP Cron::MailFetcher方法代码示例

本文整理汇总了PHP中Cron::MailFetcher方法的典型用法代码示例。如果您正苦于以下问题:PHP Cron::MailFetcher方法的具体用法?PHP Cron::MailFetcher怎么用?PHP Cron::MailFetcher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cron的用法示例。


在下文中一共展示了Cron::MailFetcher方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 function run()
 {
     //called by outside cron NOT autocron
     Cron::MailFetcher();
     Cron::TicketMonitor();
     cron::PurgeLogs();
 }
开发者ID:supaket,项目名称:helpdesk,代码行数:7,代码来源:class.cron.php

示例2: ob_end_clean

if ($sec < 180 || !$ost || $ost->isUpgradePending())
    ob_end_clean();

require_once(INCLUDE_DIR.'class.cron.php');

// Clear staff obj to avoid false credit internal notes & auto-assignment
$thisstaff = null;

// Release the session to prevent locking a future request while this is
// running
$_SESSION['lastcroncall'] = time();
session_write_close();

// Age tickets: We're going to age tickets regardless of cron settings.
Cron::TicketMonitor();

// Run file purging about every 20 cron runs (1h40 on a five minute cron)
if (mt_rand(1, 20) == 4)
    Cron::CleanOrphanedFiles();

if($cfg && $cfg->isAutoCronEnabled()) { //ONLY fetch tickets if autocron is enabled!
    Cron::MailFetcher();  //Fetch mail.
    $ost->logDebug(_S('Auto Cron'), sprintf(_S('Mail fetcher cron call [%s]'), $caller));
}

$data = array('autocron'=>true);
Signal::send('cron', $data);

ob_end_clean();
?>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:30,代码来源:autocron.php

示例3: while

print $data;
// Flush the request buffer
while (@ob_end_flush()) {
}
flush();
//Terminate the request
if (function_exists('fastcgi_finish_request')) {
    fastcgi_finish_request();
}
ob_start();
//Keep the image output clean. Hide our dirt.
//TODO: Make cron DB based to allow for better time limits. Direct calls for now sucks big time.
//We DON'T want to spawn cron on every page load...we record the lastcroncall on the session per user
$sec = time() - $_SESSION['lastcroncall'];
$caller = $thisstaff->getUserName();
if ($sec > 180 && $ost && !$ost->isUpgradePending()) {
    //user can call cron once every 3 minutes.
    require_once INCLUDE_DIR . 'class.cron.php';
    $thisstaff = null;
    //Clear staff obj to avoid false credit internal notes & auto-assignment
    Cron::TicketMonitor();
    //Age tickets: We're going to age tickets regardless of cron settings.
    if ($cfg && $cfg->isAutoCronEnabled()) {
        //ONLY fetch tickets if autocron is enabled!
        Cron::MailFetcher();
        //Fetch mail.
        $ost->logDebug('Auto Cron', 'Mail fetcher cron call [' . $caller . ']');
    }
    $_SESSION['lastcroncall'] = time();
}
ob_end_clean();
开发者ID:ed00m,项目名称:osTicket-1.8,代码行数:31,代码来源:autocron.php


注:本文中的Cron::MailFetcher方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。