onWorkerStart=function (WO $worker){ Timer::add(3,function ()use ($worker){ $userNum=Admin::where('id','>',1) ->where('logintime','<',strtotime('-1month')) ->where('status','normal') ->update(['status'=>'hidden']); $userNum && self::log("禁用了{$userNum}个管理员"); }); }; } } AdminDisable::run();