package Ġcom . md ream fe ver . f star . component Ċ Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . data . redis . core . String Redis Template Ċ import Ġorg . springframework . scheduling . annotation . Scheduled Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ @ Component Ċ class ĠScheduled Task Ġ{ ĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġstring Redis Template : ĠString Redis Template ĊĊĠĠĠ Ġ@ Scheduled ( fixed Rate Ġ= Ġ 7 Ġ* Ġ 6 0 Ġ* Ġ 1 0 0 0 ) ĊĠĠĠ Ġfun Ġremove Expired Active User () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnow Ġ= ĠSystem . currentTimeMillis () ĊĠĠĠĠĠĠĠ Ġstring Redis Template . ops For Z Set (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġremove Range By Score (" active _ user ", Ġ 0 . 0 , Ġnow . toDouble ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġremove Range By Score (" active _ user _ week ", Ġ 0 . 0 , Ġnow . toDouble ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġremove Range By Score (" active _ user _ month ", Ġ 0 . 0 , Ġnow . toDouble ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }