* @version 3.0 - 2011-11-25 * @package crontab */ include_once dirname(__FILE__).'/base/cronBase.php'; include_once dirname(__FILE__).'/base/dealBase.php'; class MonCron extends cronBase { public function setPara() { $obj = new mDaemon(); $rdobj = $obj->initRedis(); $server_ip = $obj->getServerIp(); // 是否存在需要启动的代理 $proxy_exec_list = $obj->getProxyExecListByIp($server_ip); if(is_array($proxy_exec_list) && count($proxy_exec_list) >0) { $res = $rdobj->lpush(sprintf(_RQ_START_PROXY, $server_ip), $server_ip); } $timestamp = $rdobj->get(sprintf(_RD_RESTART_SERVER, $server_ip)); if(empty($timestamp)) { $rdobj->set(sprintf(_RD_RESTART_SERVER, $server_ip), time()); } $daemon = $obj->getStartProcConf($server_ip); $this->process = $daemon['flag2proc']; $this->procnumlist = $daemon['flag2maxnum']; $this->maxtimelist = $daemon['flag2maxtime']; return ; } } new MonCron;