title: How to Implement Scheduled Task in Spring Web Service?
body: <p>I am developing Java REST Web Service using Spring and Hibernate. I need to implement a feature to schedule a future task. For example, When User Sign Up in my application I have to credit him 100 virtual credits to his account for first six months. Like this there is some more similar features.</p>
  
  <p>I am thinking like <code>TimerTask</code> can be used for this feature. The problem is If I create <code>Timer</code> for each users who sign up, I can't able to stop <code>Timer</code> of specific user if he goes inactive and it seems like dumping Thread in memory. If 1000 users sign up there will be 1000 <code>TimerTask</code> Threads.</p>
  
  <p>How to implement this kind of feature using Spring or Java? I should have the full control over the Thread, I can able to stop thread If I want.</p>