 
         robot.messageRoom room, message
 
-  reportUntagged = (room, reportZero) ->
+  reportUntagged = (room, duration, reportZero) ->
     reportZero = no if not reportZero?
+    duration = moment.duration duration if duration?
 
     fetchInstances (data) ->
       if not data

      msg.reply "Unable to remove Job ##{id}"
    msg.finish()

  robot.respond /aws untagged(?: at ([^]+))?/, (msg) ->
    [ __, cron ] = msg.match
    if cron?
      job = setupJob 'reportUntagged', [ msg.message.room ], cron
      msg.reply "Job ##{getJobs().length - 1} has been scheduled to run `#{job.func}` with `#{job.args}` at cron `#{job.time}`"
    else
      reportUntagged msg.message.room, yes
    msg.finish()

  robot.respond /aws query ([^\s]+)(?: running for ([^\s]+))?(?: at ([^]+))?/, (msg) ->

          missing and instance.State.Name is 'running'
        instances.length > 0

      untagged = _(untagged).filter (reservation) ->
        instances = _(reservation.Instances).filter (instance) ->
          inRange = yes
          if duration?
            diff = moment().diff instance.LaunchTime, 'seconds'
            inRange = diff > duration.asSeconds()
          inRange
        instances.length > 0

      if untagged.length > 0
        message = "The following instances are missing at least one of the tags (#{requiredTags})"
        message += " and have been running for at least #{duration.humanize()}" if duration?
        reportInstancesWithMessage untagged, message, room
      else
        message = "There are no untagged instances"
        message += " that have been running for at least #{duration.humanize()}" if duration?
        message += ", go team!"
        if reportZero
          robot.messageRoom room, message
        else
