本文整理汇总了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();
}
示例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();
?>
示例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();