forked from eprunier/ariane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating with scheduling, only working in intellij, think the thread …
…isn't getting hit with the println of the feed... might try another.
- Loading branch information
Showing
7 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Wed, 18 Sep 2013 21:15:44 +0000 | ||
Thu, 19 Sep 2013 16:34:48 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,6 @@ | |
[clj-time.format :as ctf] | ||
)) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
(def lastrun (atom (slurp "lastrun.txt") )) | ||
|
||
(defn updatedate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
(ns ariane.sched | ||
|
||
(:require [ariane.core :as ac] | ||
[clojurewerkz.quartzite.scheduler :as qs] | ||
[clojurewerkz.quartzite.triggers :as t] | ||
[clojurewerkz.quartzite.jobs :as j] | ||
[clojurewerkz.quartzite.jobs :refer [defjob]] | ||
[clojurewerkz.quartzite.schedule.daily-interval :refer [schedule monday-through-friday starting-daily-at time-of-day ending-daily-at with-interval-in-minutes]])) | ||
|
||
(defrecord NoOpJob [] | ||
org.quartz.Job | ||
(execute [this ctx] | ||
(println (ac/parse "http://news.boisestate.edu/update/feed/")) | ||
)) | ||
|
||
(defn -main | ||
[& m] | ||
(qs/initialize) | ||
(qs/start) | ||
(when (qs/started?) | ||
(println "The scheduler is running.")) | ||
(let [job (j/build | ||
(j/of-type NoOpJob) | ||
(j/with-identity (j/key "jobs.noop.1"))) | ||
trigger (t/build | ||
(t/with-identity (t/key "triggers.1")) | ||
(t/start-now) | ||
(t/with-schedule (schedule | ||
(with-interval-in-minutes 15) | ||
(monday-through-friday) | ||
(starting-daily-at (time-of-day 8 00 00)) | ||
(ending-daily-at (time-of-day 18 00 00)))))] | ||
(qs/schedule job trigger))) | ||
|
||
|