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

## schedule
Class TaskTime

    java.lang.Object
      schedule.TaskTime

All Implemented Interfaces:
  ISchedulable

    public class TaskTime

extends java.lang.Object
implements ISchedulable

Purpose of this class is to provide iterator returning exact dates at which various tasks and actions can be scheduled. This iterator allows scheduling task at most once per day, as it enables user to provide wildcards matching any day of month or week. However, hour and minute of execution must be entered exactly. This class returns values with accuracy in minutes, i.e seconds and milliseconds of date returned is allways 0. Number of day is as follows: Monday is 1, Tuesday is 2 and so on with Sunday as day 7.

See Also:
  `ISchedulable`

Field Summary

Fields inherited from interface schedule.ISchedulable
`ANYTIME`

Constructor Summary
`TaskTime(int dayOfMonth, int dayOfWeek, int hour, int minute)` Basic constructor which takes values representing day of month or day in week, hour and minute of time, when task should run.

Method Summary
`boolean` | `accepts(java.util.Date date)` Checks whether date passed to function is valid date when task can be run.
`java.util.Date` | `nextDue()` Returns date of next execution of given task.

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

Constructor Detail

### TaskTime

    public TaskTime(int dayOfMonth,
                    int dayOfWeek,
                    int hour,
                    int minute)

  Basic constructor which takes values representing day of month or day in week, hour and minute of time, when task should run. Task must run at least every month, which is long enough and at most once per day. Wildcard matching any day of month or week can be passed as arguments. This wildcard is ITask.ANYTIME constant. This wildcard cannot be used to specify hour or minute of execution. At least one parameter passed to this function must be wildcard, i.e user cannot specify both day in month and day in week, when task should run, although ability to run tasks at Friday 13 is appealing.

  Parameters:
    `dayOfMonth` - number of day in month, wildcard can be used
    `dayOfWeek` - number of day in week, wildcard can be used
    `hour` - exact hour of execution in 24 hour per day format
    `minute` - exact minute of execution

Method Detail

### nextDue

    public java.util.Date nextDue()

  Returns date of next execution of given task.

  Specified by:
    `nextDue` in interface `ISchedulable`
  Returns:
    date of next run of task

### accepts

    public boolean accepts(java.util.Date date)

  Checks whether date passed to function is valid date when task can be run.

  Specified by:
    `accepts` in interface `ISchedulable`
  Parameters:
    `date` - date to checks
  Returns:
    true only if date matches configured parameters

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