Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.util.apache.avalon.cornerstone.services.scheduler
Class CronTimeTrigger

    java.lang.Object
      fr.gouv.culture.util.apache.avalon.cornerstone.services.scheduler.CronTimeTrigger

All Implemented Interfaces:
  TimeTrigger, Trigger

    public class CronTimeTrigger

extends java.lang.Object
implements TimeTrigger

This is the holder triggers based on standard crontabs format.

Author:
  Peter Donald, Ram Chidambaram

Field Summary
`protected int` | `m_dayOfMonth`
`protected int` | `m_dayOfWeek`
`protected int` | `m_hour`
`protected int` | `m_minute`
`protected int` | `m_month`
`protected int` | `m_year`

Constructor Summary
`CronTimeTrigger(int minute, int hour, int day, int month, int year, boolean isDayOfWeek)` Constructor for CronTimeTrigger.

Method Summary
`long` | `getTimeAfter(long moment)` Returns the next time after the given `moment` when this trigger goes off.
`void` | `reset()` Reset the cron-trigger.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### m_minute

    protected final int m_minute

### m_hour

    protected final int m_hour

### m_dayOfMonth

    protected final int m_dayOfMonth

### m_month

    protected final int m_month

### m_dayOfWeek

    protected final int m_dayOfWeek

### m_year

    protected final int m_year

Constructor Detail

### CronTimeTrigger

    public CronTimeTrigger(int minute,
                           int hour,
                           int day,
                           int month,
                           int year,
                           boolean isDayOfWeek)

  Constructor for CronTimeTrigger. Day is either day of week or day of month depending on value of isDayOfWeek. if (isDayOfWeek == true) then valid values are 1-7 otherwise the values are 1-31

  Parameters:
    `minute` - the minute at which job is scheduled. (0-59)
    `hour` - hour at which job is scheduled. (0-23 or -1 for every hour)
    `month` - the month at which job is scheduled. (0-11 or -1 for every month)
    `year` - the year when job is scheduled (-1 implies every year)
    `day` - the day
    `isDayOfWeek` - true if day is a day of week or false if day is day of month

Method Detail

### getTimeAfter

    public long getTimeAfter(long moment)

  Returns the next time after the given `moment` when this trigger goes off.

  Specified by:
    `getTimeAfter` in interface `TimeTrigger`
  Parameters:
    `moment` - base point in milliseconds
  Returns:
    the time in milliseconds when this trigger goes off

### reset

    public void reset()

  Reset the cron-trigger.

  Specified by:
    `reset` in interface `Trigger`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.