cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject Re: TestCronJob
Date Fri, 04 Jun 2004 19:41:50 GMT
Hi Jeremy,

I tried using cron a couple of months ago and ran into
the following problem:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28383

I'd like to know if it's just me or if this happens
for you as well.

Cheers,
-Alex

--- Jeremy Quinn <jeremy@media.demon.co.uk> wrote:
> Hi All
> 
> I am playing with o.a.c.components.cron.TestCronJob.
> 
> I am using it to call a pipeline once per day that
> runs a FlowScript 
> that scours a database for jobs that need doing and
> sending out email 
> reminders.
> 
> The FlowScript calls one pipeline to generate the
> email body via 
> 'cocoon.processPipelineTo' and another pipeline to
> generate the cron 
> log written by TestCronJob via 'cocoon.sendPage'.
> 
> It works really well, many thanks !!!!!!
> 
> 
> Before starting this, I was expecting to have to
> write my own CronJob, 
> but I found that TestCronJob did everything I needed
> (call a pipeline, 
> log the output).
> 
> However, there is something I do not understand
> about TestCronJob.
> 
> It sleeps after it has done the job, for a
> configurable amount of time.
> 
> 	try {
> 		Thread.sleep(m_sleep);
> 	} catch (final InterruptedException ie) {
> 		//getLogger().error("CronJob " + name + "
> interrupted", ie);
> 	}
> 
> Is it doing this because it is a test class and this
> is providing some 
> kind of debug information, or is it doing it because
> this is something 
> that a CronJob needs to do, and I would need to take
> care to set the 
> sleep parameter appropriately.
> 
> Thanks for any suggestions
> 
> regards Jeremy
> 
> 

> ATTACHMENT part 2 application/pkcs7-signature
name=smime.p7s



Mime
View raw message