tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject RE: Rollover for each day ? Is this possible ??
Date Sun, 21 Jan 2001 12:46:46 GMT
At 12:24  19/1/01 +0100, Ceki Gulcu wrote:
>1) The new appender should have flexible way of expressing the rollover 
>frequency, perhaps in the same format as in the Unix crontabs file which I 
>belive is also a Posix standard. I am not aware of any library that 
>supports this. JDring (http://webtools.dyade.fr/jdring/) seems to have most 
>of the functionality needed except parsing the crontab format. Anyone know 
>anything better?

Just as a FYI Avalon has a Crontab date timing device thingie. It is under
org.apache.avalon.blocks.scheduler.* and
org.apache.avalon.services.scheduler.*

These will eventually be removed from Avalon as it is not their place but
for now they remain...

>As a side note, the omission of a crontab/at functionality in Java core 
>libraries seems like a major oversight. Try buying stock a day later then 
>what the customer ordered. See how many customers stay with your brokerage 
>house.  :-)

I started implementing a cron server in java. The above was the very early
pieces of it. What I did was use the Cron time format and instead of
listing a command at the end (ie doSomething.sh) I used a job "name". Jobs
were defined in an Ant-like "jobfile" so that it would look like

<jobs>

  <job name="foo-job" ... >
    <task1 ... />
    <task2 ... />
    <task4 ... />
  </job>

</jobs>

You could schedule 5-6000 jobs without any undue overhead. The only problem
occured with jobs that had short repeating periods but the actual job
execution took longer than repeat period. It was based on an old version of
avalon and a fork of ant I did ages ago.

Eventually when the direction of ants future is more clear I may update the
server to use newish versions of both toolkits. At that time I can put it
somewhere ala sourceforge if you are interested in it.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message