Re: Clojure job scheduler

2012-06-11 Thread Joao_Salcedo
hi Trevor could you share how did you solve the issue. I would like to learn more about it. If you can share your solution would be great On Saturday, January 8, 2011 4:13:17 AM UTC+11, Trevor wrote: What's the best way to kick off Clojure code at scheduled times? I have some that would run

Re: Clojure job scheduler

2012-06-11 Thread Sun Ning
By the way, overtone has made a simple library for scheduled task. You may take a look: https://github.com/overtone/at-at On Mon 11 Jun 2012 04:31:41 PM CST, Joao_Salcedo wrote: hi Trevor could you share how did you solve the issue. I would like to learn more about it. If you can share your

Re: Clojure job scheduler

2011-01-09 Thread Patrik Fredriksson
I have used cron4j in a small project, it's like a more lightweight version of Quartz and fits nicely with Clojure: http://www.sauronsoftware.it/projects/cron4j/ Code example here: https://gist.github.com/388555 /Patrik On Jan 8, 8:37 pm, Trevor tcr1...@gmail.com wrote: Thanks, everyone for

Re: Clojure job scheduler

2011-01-09 Thread Trevor
That works it's really easy to use - Thanks. On Jan 9, 9:22 am, Patrik Fredriksson patri...@gmail.com wrote: I have used cron4j in a small project, it's like a more lightweight version of Quartz and fits nicely with Clojure:http://www.sauronsoftware.it/projects/cron4j/ Code example

Re: Clojure job scheduler

2011-01-08 Thread Jeff Rose
We use the Quartz library for job scheduling in our Clojure projects. It's nice to have this done within the JVM so that we can easily deploy to a new server without needing to configure cron (and the differences with cron across platforms...). http://www.quartz-scheduler.org/ If you want to

Re: Clojure job scheduler

2011-01-08 Thread Ken Wesson
On Sat, Jan 8, 2011 at 12:04 AM, Michael Gardner gardne...@gmail.com wrote: On Jan 7, 2011, at 9:19 PM, Ken Wesson wrote: On the other hand, running a job scheduler from outside Clojure results in cranking up a big, slow to start up, expensive JVM process every single time a task needs to

Re: Clojure job scheduler

2011-01-08 Thread Trevor
Thanks, everyone for all you help. I noticed a few questions I should answer. re: email option: I really just planned on sending a gmail to indicate the job succeeded or failed. Being somewhat new to programming the straightest path, for me, would be using clojure code (I'm not a network guru,

Re: Clojure job scheduler

2011-01-08 Thread Stuart Sierra
In a long-running process, Java's ScheduledThreadPoolExecutor [1] will handle this. Since Clojure's functions implement both Java Callable and Runnable, they can be passed as arguments to the .submit and .schedule* methods. -Stuart Sierra clojure.com [1]

Clojure job scheduler

2011-01-07 Thread Trevor
What's the best way to kick off Clojure code at scheduled times? I have some that would run once a day. Some that might run 2 or 3 times a day based upon a test being met. 1. I could write a function that sleeps an interval, check the time differential to perform a time-box triggered function,

Re: Clojure job scheduler

2011-01-07 Thread gaz jones
the work library has a function which it describes as 'cron for clojure functions': https://github.com/clj-sys/work.git cant say i have used it, but i noticed it in there recently whilst looking for other things. here is the function: (defn schedule-work schedules work. cron for clojure fns.

Re: Clojure job scheduler

2011-01-07 Thread Michael Gardner
On Jan 7, 2011, at 11:13 AM, Trevor wrote: 3. I could set a job-schedule using the OS to run a clojure script. I'd rather not, I would like to do things like send emails / check status via web app (making option 1 more appealing). Could you elaborate on why a scheduled job to run a Clojure

Re: Clojure job scheduler

2011-01-07 Thread Ken Wesson
On Fri, Jan 7, 2011 at 9:35 PM, Michael Gardner gardne...@gmail.com wrote: On Jan 7, 2011, at 11:13 AM, Trevor wrote: 3. I could set a job-schedule using the OS to run a clojure script. I'd rather not, I would like to do things like send emails / check status via web app (making option 1 more

Re: Clojure job scheduler

2011-01-07 Thread Michael Gardner
On Jan 7, 2011, at 9:19 PM, Ken Wesson wrote: On the other hand, running a job scheduler from outside Clojure results in cranking up a big, slow to start up, expensive JVM process every single time a task needs to run, each of which runs one task once, and the scheduling itself must be done