cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject TestCronJob
Date Fri, 04 Jun 2004 18:15:21 GMT
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 

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

View raw message