load(array('ldate' => array('<=', $time))); if ($data) { foreach ($data as $k => $v) { Cmd::run($v['interface'], array(), $v['project']); $param['ldate'] = $v['ldate'] + $v['time']; if ($param['ldate'] < $time) { $param['ldate'] = $time + $v['time']; } if ($v['time'] <= 0) { $param['state'] = 2; } Dever::db('cron', 'manage')->update($v['id'], $param); } } } }