       (error (str-stacktrace e)))))
 
 (defn schedule
-  [env & [action interval]]
-  (let [pool (get-pool env)]
-    (at-at/stop-and-reset-pool! pool :strategy :kill)
-    (if (= action "stop")
-      {:message "Succefully stopped the shuppet scheduler"}
-      (let [interval (Integer/parseInt (or interval (env :service-scheduler-interval)))]
-        (at-at/every (* interval 60 1000)
-                     #(configure-apps env)
-                     pool
-                     :desc (rfc2616-time))
-        {:message
-         (str "Succesfully started the shuppet scheduler. The scheduler will run in every "
-              interval " minutes.") }))))
+  [environment & [action interval]]
+  (try+
+   (let [pool (get-pool environment)]
+     (at-at/stop-and-reset-pool! pool :strategy :kill)
+     (if (= action "stop")
+       {:message "Succefully stopped the shuppet scheduler"}
+       (let [interval (Integer/parseInt (or interval (env :service-scheduler-interval)))]
+         (at-at/every (* interval 60 1000)
+                      #(configure-apps environment)
+                      pool
+                      :desc (rfc2616-time))
+         {:message
+          (str "Succesfully started the shuppet scheduler. The scheduler will run in every "
+               interval " minutes.") })))
+   (catch Exception e
+     (error (str-stacktrace e))
+     (throw+ e))))
 
 (defn get-schedule
   [env]

    [core :as core]
    [util :refer [rfc2616-time str-stacktrace]]]
   [clojure.tools.logging :refer [info warn error]]
   [environ.core :refer [env]]
   [clojure.string :refer [split]]
   [overtone.at-at :as at-at]))

  []
  (when-not (= (env :environment-name) "local") ;dont want the auto scheduler for our test envs
    (doseq [environment environments]
      (at-at/after (* (Integer/parseInt
                       (or (env (keyword (str "service-scheduler-delay-" environment))) "1"))
                      60 1000)
                   #(schedule environment)
                   (get-pool environment)
