title: create a background Hosted service that can obtain current logged in user info then preform certain scheduled tasks
body: <p>I have built a web application via asp.net core, and now I am planning to implement a background service such as IHostedService, BackgroundService etc..</p>
  <p>My application does require to only run the worker service if they user is being logged in, so if user being logged in I need the background service to obtain user info, then preform certain scheduled tasks, thus if user close application or logged out the background service must stop preforming the tasks for that specific user.</p>
  <p>How can I make a background service run only if user is logged in</p>