<?php
if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli') {
    die("The program runs only in CLI mode!");
}
$sid =$lid =1;
include_once dirname(__FILE__) . "/crontab.inc.php";
include_once dirname(__FILE__) . "/../com.php";
set_time_limit(0);
$minute = date('i');
$now = time();

//定时记录推金币游戏记录
//$res = oo::commonOprModel('coindozer')->cronToLandGameLog();

//消费缓存的用户ip,并入库
$res1['insert_rank'] = oo::commonOprModel('ipaddress')->writeUserAddressIntoDB();


/********十分钟定时 Start *********/
if($minute%10 == 0) {
    //刷新星星数世界排行榜
    //oo::commonOprModel('rank')->getWorldStaRank(true);
    //刷新星星国家排行
    //oo::commonOprModel('rank')->newCountryRank();
}
/********* End ********/

//$res2['update'] = oo::commonOprModel('ipaddress')->updateUserAddressIntoDb();
oo::logs()->commlog('update user address is:'.json_encode($res1),'crontab/rank_'.date("Ymd"));
