To be honest I see no point in using core.async or any other library for 
that matter. Java already solves this problem very well.

(ns ...
  (:import [java.util.concurrent TimeUnit Executors]))

(def scheduler
  (doto (Executors/newSingleThreadScheduledExecutor)
    (.scheduleAtFixedRate
     the-function-that-gets-called-every-hour
     0 ;; initial delay till execution starts
     1 ;; delay between each runs
     TimeUnit/HOURS ;; the unit of the above two values
     )))

When and where you set this up is dependent on your app and you must 
remember to (.shutdown scheduler) at some point, but beyond that it is 
pretty simple.

HTH,
/thomas

On Wednesday, September 23, 2015 at 1:00:32 PM UTC+2, bahadir cambel wrote:
>
>
> Hi Leon, 
>
> you may check http://www.clojure-toolbox.com/ and see the schedule 
> section. Here are the suggestions; 
>
> https://github.com/jarohen/chime (has core.async examples)
> https://github.com/overtone/at-at
> https://github.com/zcaudate/cronj
>
> Also, if you're using HTTP-Kit http://www.http-kit.org/timer.html
>
> Cheers,
> Bahadir
> twitter.com/bahadircambel
>
>
>
>
>
>
> On Tuesday, September 22, 2015 at 4:35:37 PM UTC+2, Leon Grapenthin wrote:
>>
>> Is it recommended to use core.asyncs timeout channel to wait on hour or 
>> even longer for light scheduling tasks?
>>
>> High precision is a nongoal.
>>
>> Kind regards,
>>  Leon.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to