   minSchedule = 1000
 
   notificationSchedule = (notification, user = notification.to) ->
-    time = notificationTime notification, user
+    base = dateMin(notification.dates...)
     username = user.username ? user
     ## If a batch notification is already scheduled earlier than this one
     ## would be, then that will cover this notification, so we don't need to

  users = messageSubscribers msg, options
  _.sortBy users, userSortKey

@notificationTime = (notification, user = notification.to) ->
  ## Currently notification timing doesn't depend on the notification
  ## itself, only on the user that it's addressed to.
  user = findUsername user
  delays = user.profile?.notifications?.after ?
           defaultNotificationDelays.after
  moment(dateMin(notification.dates...)).add(delays.after, delays.unit).toDate()
  ## Old settle dynamics:
  #settleTime = moment(dateMax(notification.dates...)).add(delays.settle, delays.unit).toDate()
  #maximumTime = moment(dateMin(notification.dates...)).add(delays.maximum, delays.unit).toDate()

    ## we also don't need to do anything, because at the end of running the
    ## notifier will check for any new notifications to schedule.
    if username of notifiers
      return if notifiers[username].running
      return if notifiers[username].base.getTime() <= base.getTime()
    else
      notifiers[username] =
        base: base
    notificationReschedule user

  notificationReschedule = (user) ->
    ## Call this once notifiers[username].base has been set,
    ## and either the timeout hasn't been scheduled yet (notifiactionSchedule)
    ## or the user's notification parameters have changed so the timeout
    ## might need to be rescheduled.
    username = user.username ? user
    if username of notifiers
      return if notifiers[username].running
      time = notificationTime notifiers[username].base, user
      return if time.getTime() == notifiers[username].time?.getTime()
      if notifiers[username].timeout?
        Meteor.clearTimeout notifiers[username].timeout
      notifiers[username].time = time
      now = new Date()
      #console.log username, '@', time.getTime() - now.getTime()
      notifiers[username].timeout =
        Meteor.setTimeout ->
          notificationDo username
        , Math.max(minSchedule, time.getTime() - now.getTime())
