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 run, each of which runs one task
>> once, and the scheduling itself must be done in an icky language like
>> shell or cron's idiosyncratic "crontab" files with icky error
>> reporting (e.g., need to run a local mail *server* to receive error
>> notifications).
>
> If you care about startup times, you can use nailgun. But that shouldn't 
> matter unless you're running the job every minute or something.

Obviously, that requires knowing about, and learning how to use,
nailgun. Solutions with a higher cost in
novel-tools-you-have-to-figure-out-how-to-use are not, all other
things being equal, superior ones.

> As for scheduling, crontabs are really not hard to figure out. If you need 
> more complex scheduling, you can do that from your Clojure script 
> (essentially using cron to set the polling interval).

If you're going to do that anyway, you might as well do the whole
thing from inside Clojure.

> And what kinds of error reporting could you do from a persistent daemon that 
> you couldn't also do from a cron job? Besides, most
> systems that have cron also come with postfix (though it's disabled by 
> default on Mac OS X), so all you have to do is add your email
> address to /etc/aliases. Email-based error reporting for background tasks is 
> really nice because you don't have to remember to check
> some log file or other task-specific status indicator periodically (which has 
> burned me in the past).

Well, both Windows and MacOS have variations on the nifty concept of
"tray notification".

> But this is all somewhat beside the point. What Trevor said sounded as though 
> the specific types of tasks he mentioned (sending
> emails and checking some kind of status via web app) were particularly 
> unsuited to scheduled jobs; I was asking what it was about
> those tasks in particular that made him lean towards a daemon instead.

Maybe he needs timely responses to something, so something more akin
to a web server than a periodically-run job?

-- 
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

Reply via email to