// +---------------------------------------------------------------------- namespace crmeb\listens; use app\common\repositories\user\UserRepository; use crmeb\interfaces\ListenerInterface; use crmeb\jobs\SyncQueueStatusJob; use crmeb\services\TimerService; use crmeb\services\YunxinSmsService; use Swoole\Timer; use think\facade\Queue; class SyncUserCountContentListen extends TimerService implements ListenerInterface { public function handle($event): void { $this->tick(1000 * 60 * 60 * 4, function () { app()->make(UserRepository::class)->syncUserCountContent(); }); } }