You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gintare Ragaisiene <gi...@gmail.com> on 2009/11/24 09:53:49 UTC

Timer on cocoon

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

Re: Timer on cocoon

Posted by Gintare Ragaisiene <gi...@gmail.com>.
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 <Jo...@pandora.be>wrote:

> 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
> > <Jo...@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-unsubscribe@cocoon.apache.org
> >         For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Timer on cocoon

Posted by Jos Snellings <Jo...@pandora.be>.
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
> <Jo...@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-unsubscribe@cocoon.apache.org
>         For additional commands, e-mail: users-help@cocoon.apache.org
>         
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Timer on cocoon

Posted by Gintare Ragaisiene <gi...@gmail.com>.
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 <Jo...@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-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Timer on cocoon

Posted by Jos Snellings <Jo...@pandora.be>.
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-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org