javatools.cron
Interface CrontabEntryInterface

All Known Implementing Classes:
CrontabEntry

public interface CrontabEntryInterface

This is the interface a class must conform to in order to be scheduled by Cron. Cron needs to know just two things: When the next event will occur at or after a certain time and secondly, what to do when that event occurs.


Method Summary
 void execute()
          When an event occurs, what should be done?
 long nextEvent(long from)
          When will the next event occur that is equal to or later than from.
 

Method Detail

nextEvent

public long nextEvent(long from)
When will the next event occur that is equal to or later than from.

Parameters:
from - a time expressed in milliseconds as per the Date class.
Returns:
the next time the event should occur

execute

public void execute()
When an event occurs, what should be done?