Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 41530 invoked from network); 4 Jun 2004 19:43:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jun 2004 19:43:26 -0000 Received: (qmail 77706 invoked by uid 500); 4 Jun 2004 19:43:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 77636 invoked by uid 500); 4 Jun 2004 19:43:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 77619 invoked by uid 99); 4 Jun 2004 19:43:37 -0000 Received: from [206.190.39.87] (HELO web52205.mail.yahoo.com) (206.190.39.87) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 04 Jun 2004 12:43:37 -0700 Message-ID: <20040604194150.80234.qmail@web52205.mail.yahoo.com> Received: from [68.193.124.45] by web52205.mail.yahoo.com via HTTP; Fri, 04 Jun 2004 12:41:50 PDT Date: Fri, 4 Jun 2004 12:41:50 -0700 (PDT) From: Alex Romayev Subject: Re: TestCronJob To: dev@cocoon.apache.org In-Reply-To: <24584E90-B653-11D8-AF3A-0003935AD2EE@media.demon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 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