title: Issue with timing of Cache removal from server
body: <p>I am trying to automate a process on my server. I want my program to run every 24 hours at 12:00:00 a.m. So I implemented the method suggested here: <a href="https://stackoverflow.blog/2008/07/18/easy-background-tasks-in-aspnet/">https://stackoverflow.blog/2008/07/18/easy-background-tasks-in-aspnet/</a></p>
  
  <p>When I run my program locally, it works fine (i.e. it runs at 12:00:00 a.m.) However, when I run the code on server, I see that the Cache is removed at random intervals (e.g. 7:44:03 PM, 6:48:08 AM, 1:33:47 PM, 4:50:35 PM, etc.) Is this because servers manage cache differently, or I'm missing something?</p>
  
  <p>Here's my code in Global.asax.cs:</p>
  
  <pre><code>protected void Application_Start()
  {
      // Some configuration here
  
      AddTask("NextRoundPreparer");
  }
  
  private void AddTask(string name)
  {
      DateTime today = DateTime.Today;
      DateTime tomorrow = today.AddDays(1);
  
      OnCacheRemove = new CacheItemRemovedCallback(CacheItemRemoved);
      HttpRuntime.Cache.Insert(name, name, null,
          tomorrow, Cache.NoSlidingExpiration,
          CacheItemPriority.NotRemovable, OnCacheRemove);
  }
  
  public void CacheItemRemoved(string key, object value, CacheItemRemovedReason reason)
  {
      //Do some work here
  
      AddTask(key);
  }
  </code></pre>