org.backsource.amsterdam.cron
Class CronJob

java.lang.Object
  extended byorg.backsource.amsterdam.cron.CronJob

public class CronJob
extends java.lang.Object

Represents a Job/Task to be run by a CronManager.

A CronJob takes a string describing when it is to be run. The string hase the same format as the date and time fields in a Unix/Vixie Crontab entry. It also takes a ContentMapEntry. This is an opaque object that may be accessed in the listener that is called when the CronManager "executes" the job.

The sceduleAt string follows the syntax of a cronlike Date/Timestring

     String: minute hour day-of-month month day-of-week

            field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (no names)
              day of week    1-7 (1 is Sun)
  

Currently ranges are not alowed, only skips, ie 0-12 is not allowed, but *\/5 wich for minutes means every fifth minute.

Some examples:

Run every minute: * * * * *.

Run every fith minute: *\/5 * * * *.

Run at three a clock every day: 0 3 * * *.

Run at three a clock every monday: 0 3 * * 2.

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Constructor Summary
CronJob(java.lang.String scheduleAt, ContentMapEntry contentEntry)
           
 
Method Summary
 java.lang.String getContentAsXML(boolean prettyPrint)
           
 ContentMapEntry getContentEntry()
           
 java.lang.String getCronDateTime()
           
 void setContentEntry(ContentMapEntry contentEntry)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CronJob

public CronJob(java.lang.String scheduleAt,
               ContentMapEntry contentEntry)
Method Detail

getCronDateTime

public java.lang.String getCronDateTime()

getContentEntry

public ContentMapEntry getContentEntry()

setContentEntry

public void setContentEntry(ContentMapEntry contentEntry)

toString

public java.lang.String toString()

getContentAsXML

public java.lang.String getContentAsXML(boolean prettyPrint)


Copyright © 2001-2004 Backsource. All Rights Reserved.