Пример #1
0
 function call()
 {
     $cron = new LocalCronApiController();
     $cron->run();
 }
Пример #2
0
<?php

/*********************************************************************
    cron.php

    File to handle LOCAL cron job calls.

    Peter Rotich <*****@*****.**>
    Copyright (c)  2006-2013 osTicket
    http://www.osticket.com

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
@chdir(realpath(dirname(__FILE__)) . '/');
//Change dir.
require 'api.inc.php';
if (!osTicket::is_cli()) {
    die('cron.php only supports local cron calls - use http -> api/tasks/cron');
}
@chdir(realpath(dirname(__FILE__)) . '/');
//Change dir.
require 'api.inc.php';
require_once INCLUDE_DIR . 'api.cron.php';
LocalCronApiController::call();