On Sep 2, 2:49 pm, Mathias Dahl <[EMAIL PROTECTED]> wrote:
> It's all good advice and I have used cron before so it should not be
> hard. However, there is one problem and that is that I need to open up
> a Derby database from the cronjob, but as the database is already open
> in the webapp, it is locked and cannot be opened until the webapp is
> closed. So I will go for using a Timer, for now. The scheduling is not
> very critical (It's more like "nice to have" and I could even call the
> appropriate function manually once per week if needed) and restarting
> the app if it becomes unstable in any way is no biggy either.

If it's a webapp ...
Create a page that does what you want in whatever webapp framework you
use.
Have cron do a simple wget to that page at the appropriate time.
(some security would need to be implemented.)

Otherwise I second the usefullness of Quartz.  It can be integrated
into the java webapp process, and it can configure just like cron.  At
least I've done it with Tomcat and JBoss.
(IIRC Quartz has one extra field than what cron has in the job
settings.  Maybe it's "seconds")

--paul wisehart
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to