exit("{$ebayaccount} is not support now !"); } /*----- 传入参数处理 -------*/ $startTime += 5; //5分钟重叠时间 防漏单 $token_file = WEB_PATH . "lib/ebaylibrary/keys/keys_" . $ebayaccount . ".php"; if (!file_exists($token_file)) { exit($token_file . " does not exists!!!"); // 密码文件不存在 } include_once '' . $token_file; date_default_timezone_set("UTC"); //时区设置为标准时间 $currenttime = date("Y-m-d H:i:s"); //当前时间 /*----- 避开早上八点到九点的高峰期 -----*/ $startTime1 = date('Y-m-d 08:20:00'); $endTime1 = date('Y-m-d 09:10:00'); $nowTime1 = date('Y-m-d H:i:s', strtotime("{$currenttime} + 480 minutes")); /* if ($nowTime1 > $startTime1 && $nowTime1 < $endTime1) { exit('此时间段不执行'); } */ /*----- 避开早上八点到九点的高峰期 -----*/ $start = date('Y-m-d H:i:s', strtotime("{$currenttime} - {$startTime} minutes")); $end = date('Y-m-d', strtotime("{$currenttime} +0 days")) . 'T' . date('H:i:s', strtotime($currenttime)); echo " {$start} --- {$end}" . "\n"; $fe_obj = new FetchModel(); $fe_obj->GetMemberMessages($start, $end, $ebayaccount, $type = 1); //抓取脚本 echo $ebayaccount . ' Success' . "\n"; exit;