Upgraded to latest icehrm core

This commit is contained in:
Thilina Hasantha
2015-12-13 02:56:30 +05:30
parent 8dacf2a8f1
commit ca3492e30e
56 changed files with 1525 additions and 689 deletions

22
src/crons/cron.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
include dirname(__FILE__).'/include.cron.php';
$cron = new Cron();
$crons = $cron->Find("status = ?",array('Enabled'));
if(!$crons){
LogManager::getInstance()->info(CLIENT_NAME." error :".$cron->ErrorMsg());
}
LogManager::getInstance()->info(CLIENT_NAME." cron count :".count($crons));
foreach($crons as $cron){
$count++;
$iceCron = new IceCron($cron);
LogManager::getInstance()->info(CLIENT_NAME." check cron :".$cron->name);
if($iceCron->isRunNow()){
LogManager::getInstance()->info(CLIENT_NAME." execute cron :".$cron->name);
$iceCron->execute();
sleep(1);
}
}