 
     complete: (user, executionDate) ->
         if reminder = @getPending user
-            console.debug "hubot-remind-advanced: Reminder created."
             @addCron reminder[0], reminder[1], executionDate
             @pending.splice @pending.indexOf(reminder), 1
             return [reminder[0], reminder[1], executionDate]
         false
 
     addCron: (user, message, executionDate) ->
-        console.debug "hubot-remind-advanced: Adding cron job."
-        setTimeout =>
+        console.log "hubot-remind-advanced: Adding cron job."
+        newTask = setTimeout =>
             @callback user, message
         , moment(executionDate).diff()
+        @crons.push newTask
+
+    clearCron: ->
+        for cron in @crons
+            clearTimeout cron
+        @crons = []
 
 
 module.exports = (robot) ->


    cancelPending: (user) ->
        if reminder = @getPending user
            console.debug "hubot-remind-advanced: Reminder cancelled."
            @pending.splice @pending.indexOf(reminder), 1
            return true
        false

class Reminder
    constructor: (@callback) ->
        @pending = []
        @crons = []

    addPending: (user, message) ->
        reminder = @getPending user
