title: Notification system based on LastUpdate
body: <p>Over the last few weeks I was tasked with developing a ticketing system specific to my companies needs. Alright, not a huge deal.. Now I am onto a little trickier subject that I just can't wrap my head around completely.</p>
  
  <p>Notification System based on a tickets last update time.</p>
  
  <p>Alright so as we all know in a ticketing system we have tickets, lots of them.. Each of our tickets have a ticket "state" such as "Waiting on Client", "Pending Shipment" etc. These states have different thresholds I.E: 60 minutes, 120 minutes..</p>
  
  <p>Basically I have a server application that runs every two hours. It loops through all the open tickets in the system, checks their ticket state and threshold and if the LastUpdate time is outside of my threshold of 60 minutes then the system fires off a notification saying that this ticket hasn't been taken care of and someone needs to get on top of it. Alright great, so that means every two hours the system runs it will check the time, if the ticket does not comply with its threshold then a level 2 notification gets sent out. The same process applies for notification 3. </p>
  
  <p>The problem with this scenario is that what happens when Friday rolls around? There may only be 3 tickets that have notifications that need to be sent by the close of business Friday. However when Monday rolls around and this system runs again, it is going to find every ticket out of compliance which means we will more than likely have over 100 tickets in peoples mailbox. This seems like such a common problem among any notification system that operates off a datetime.</p>
  
  <p>Any suggestions?</p>