Skip to content
Browse files

added cronr

  • Loading branch information...
1 parent 2706f26 commit 453424a45859b290417de003acb3fba06847caf1 nex committed
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/leftronic/cronr.clj
View
15 src/leftronic/cronr.clj
@@ -0,0 +1,15 @@
+(ns leftronic.cronr
+ (:use [leftronic.core json]
+ [cj shell]))
+
+
+
+(defn lee [] (map #(re-seq #"[^\t+]" %) (re-seq #"[^\n]+" (slurp "crons.txt"))))
+
+(defn ejecuta [l] (map #(point (first %) (sh-c (second %))) l))
+
+(defn -main []
+ (let [l (lee)]
+ (while true
+ (do (ejecuta l)
+ (sleep 60000)))))

0 comments on commit 453424a

Please sign in to comment.
Something went wrong with that request. Please try again.