Server IP : 184.154.167.98 / Your IP : 18.188.211.58 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/mesa/include/ |
Upload File : |
<?php include_once INCLUDE_DIR.'class.cron.php'; class CronApiController extends ApiController { function execute() { if (!($key=$this->requireApiKey()) || !$key->canExecuteCron()) return $this->exerr(401, __('API key not authorized')); $this->run(); } protected function run() { Cron::run(); // TODO: Add elapsed time to the debug log $this->debug(__('Cron Job'), sprintf('%s [%s]', __('Cron job executed'), $this->getRemoteAddr())); $this->response(200,'Completed'); } } class LocalCronApiController extends CronApiController { public function isCli() { return true; } protected function getRemoteAddr() { // Local Cron doesn't have IP Addr set return 'CLI'; } public function response($code, $response) { if ($code == 200) //Success - exit silently. exit(0); echo $response; exit(1); } static function call() { $cron = new LocalCronApiController('cli'); $cron->run(); } } ?>