Permalink
Browse files

added cronr

  • Loading branch information...
nex nex
nex authored and nex committed Dec 13, 2012
1 parent 2706f26 commit 453424a45859b290417de003acb3fba06847caf1
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/leftronic/cronr.clj
View
@@ -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.