   saveJobs = (jobs) ->
     robot.brain.set 'reminder-jobs', jobs
 
-  setupJob = (text, room, cron) ->
+  setupJob = (text, room, cronTime) ->
     jobs = getJobs()
     job =
+      id: Date.now()
       text: text
       room: room
-      time: cron
+      time: cronTime
+    crons[job.id] = createCron job
     jobs.push job
     saveJobs jobs
-    crons.push createCron job
     return job
 
   removeJob = (number) ->
     jobs = getJobs()
-    if jobs[number]
+    job = jobs[number]
+
+    if job
+      crons[job.id].stop()
+      delete crons[job.id]
+      crons = _(crons).compact()
+
       delete jobs[number]
       jobs = _(jobs).compact()
       saveJobs jobs
 
-      crons[number].stop()
-      delete crons[number]
-      crons = _(crons).compact()
       return yes
     else
       return no

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

  robot.respond /remind(?: me)to ([^\s]+)(?: at ([^]+))?/, (msg) ->
    [ __, text, cron ] = msg.match
    job = setupJob text, msg.message.room, cron
    msg.reply "Reminder ##{getJobs().length - 1} has been scheduled to run at cron `#{job.time}`"
    msg.finish()

  robot.brain.once 'loaded', ->
    crons.push createCron job for job in getJobs()

# robot.adapter.customMessage
#   channel: room
#   text: message

    new cronJob(job.time, (-> run job ), null, true)

  run = (job) ->
    robot.adapter.customMessage
      channel: job.room
      text: job.text

  getJobs = ->
    robot.brain.get('reminder-jobs') or []
