protected override async Task ExecuteAsync(CancellationToken stoppingToken) { if (!stoppingToken.IsCancellationRequested) { while (true) { //每5分钟更新在线的key的score await _cache.SortedSetAddAsync(_idMaker.GetUserInKey(), _idMaker.WorkId().ToString(), DateTime.Now.ToUnixTimestamp(), token : stoppingToken); await Task.Delay(280000, stoppingToken); } } }