|
Perforce Chronicle 2012.2/486814
API Documentation
|
Processes application's periodic tasks. More...
Public Member Functions | |
| indexAction () | |
| Run cron to process application's periodic tasks. | |
Public Attributes | |
| $contexts | |
Processes application's periodic tasks.
| Cron_IndexController::indexAction | ( | ) |
Run cron to process application's periodic tasks.
{
// explicitly set json context as thats all we provide
$this->contextSwitch->initContext('json');
// if background is set, close the session early but
// continue running the cron checks and tasks
$background = $this->getRequest()->getParam('background');
if ($background) {
$this->getHelper('browserDisconnect')->disconnect(null, 0);
} else {
// force json context
$this->contextSwitch->initContext('json');
}
// run cron and pass returned report to the view
$this->view->report = Cron_Model_Cron::run();
}
| Cron_IndexController::$contexts |
array(
'index' => array('json')
)