title: cron-like recurring task scheduler design
body: <p>Say you want to schedule recurring tasks, such as:</p>
  
  <ul>
  <li>Send email every wednesday at 10am</li>
  <li>Create summary on the first day of every month</li>
  </ul>
  
  <p>And you want to do this for a reasonable number of users in a web app - ie. 100k users each user can decide what they want scheduled when.</p>
  
  <p>And you want to ensure that the scheduled items run, even if they were missed originally - eg. for some reason the email didn't get sent on wednesday at 10am, it should get sent out at the next checking interval, say wednesday at 11am.</p>
  
  <p>How would you design that?</p>
  
  <p>If you use cron to trigger your scheduling app every x minutes, what's a good way to implement the part that decides what should run at each point in time?</p>
  
  <p>The cron-like implementations I've seen compare the current time to the trigger time for all specified items, but I'd like to deal with missed items as well.</p>
  
  <p>I have a feeling there's a more clever design than the one I'm cooking up, so please enlighten me.</p>