com.shimari.framework
Interface CronTask

All Known Implementing Classes:
TickerService

public interface CronTask


Method Summary
 void cron()
          This will be executed by a Cron thread, and it should be written such that it does not hang.
 long cronInterval()
          Will be called after execution, no matter whether execution terminated by exception or normal return.
 

Method Detail

cron

public void cron()
          throws java.lang.Exception
This will be executed by a Cron thread, and it should be written such that it does not hang. There are only a limited number of threads available to execute tasks.

Throws:
java.lang.Exception

cronInterval

public long cronInterval()
Will be called after execution, no matter whether execution terminated by exception or normal return. Indicates the length of time until the next execution. A return value of 0 or less means do not reschedule; a return value of 1-99 will be rewritten as 100; otherwise the task will run again in approximately that many milliseconds.