Re: Timer on cocoon
Hi, Jos, Quartz is ok and Java Timer is ok for me. But haw and where I should input lines like MyTimerThread.start() to start timer when cocoon starts working on server ? Gintare On Tue, Nov 24, 2009 at 11:10 AM, Jos Snellings jos.snelli...@pandora.bewrote: Hi, Gintare, Cocoon is not even remotely a system to schedule operations. Maybe you are looking for something like http://www.quartz-scheduler.org/ Most OS let you schedule jobs. Jos On Tue, 2009-11-24 at 10:53 +0200, Gintare Ragaisiene wrote: Hello, I need to do some job with db periodically. For this I need to set up timer. How can I do this in cocoon 2.2 ? Thanks, Gintare - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Timer on cocoon
Is MyTimerThread the task you want to schedule? - you could create a spring bean, with org.springframework.scheduling.quartz.JobDetailBean - you can start your timerthread in the init() method of a servlet to start a task off when cocoon starts working. Not sure if that works for 2.2. Hope that helps... On Tue, 2009-11-24 at 13:16 +0200, Gintare Ragaisiene wrote: Hi, Jos, Quartz is ok and Java Timer is ok for me. But haw and where I should input lines like MyTimerThread.start() to start timer when cocoon starts working on server ? Gintare On Tue, Nov 24, 2009 at 11:10 AM, Jos Snellings jos.snelli...@pandora.be wrote: Hi, Gintare, Cocoon is not even remotely a system to schedule operations. Maybe you are looking for something like http://www.quartz-scheduler.org/ Most OS let you schedule jobs. Jos On Tue, 2009-11-24 at 10:53 +0200, Gintare Ragaisiene wrote: Hello, I need to do some job with db periodically. For this I need to set up timer. How can I do this in cocoon 2.2 ? Thanks, Gintare - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Timer on cocoon
Jos, thanks for nice answer and creating a bean helped. But I don't know still how to load custom servlet on cocoon 2.2 startup. So I'll breed new thread for this question. On Tue, Nov 24, 2009 at 1:35 PM, Jos Snellings jos.snelli...@pandora.bewrote: Is MyTimerThread the task you want to schedule? - you could create a spring bean, with org.springframework.scheduling.quartz.JobDetailBean - you can start your timerthread in the init() method of a servlet to start a task off when cocoon starts working. Not sure if that works for 2.2. Hope that helps... On Tue, 2009-11-24 at 13:16 +0200, Gintare Ragaisiene wrote: Hi, Jos, Quartz is ok and Java Timer is ok for me. But haw and where I should input lines like MyTimerThread.start() to start timer when cocoon starts working on server ? Gintare On Tue, Nov 24, 2009 at 11:10 AM, Jos Snellings jos.snelli...@pandora.be wrote: Hi, Gintare, Cocoon is not even remotely a system to schedule operations. Maybe you are looking for something like http://www.quartz-scheduler.org/ Most OS let you schedule jobs. Jos On Tue, 2009-11-24 at 10:53 +0200, Gintare Ragaisiene wrote: Hello, I need to do some job with db periodically. For this I need to set up timer. How can I do this in cocoon 2.2 ? Thanks, Gintare - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org