i-net Clear Reports

com.inet.report.schedule
Class MonthlyExecution

java.lang.Object
  extended by com.inet.report.schedule.ScheduleExecution
      extended by com.inet.report.schedule.MonthlyExecution
All Implemented Interfaces:
ExecutionTimeProvider

public class MonthlyExecution
extends ScheduleExecution

An ExecutionTimeProvider which would be described in the form "Run the task in the months ___, ___, and ___ on days _____, ____, and ____ at ____ o'clock." To create a MonthlyExecution object, use createMonthlyExecution from the class ScheduleExecutionFactory.
Once created, you can set the specific months and the specific days of the month in addition to changing time of day and hour range, methods in the super class ScheduleExecution.

Since:
6.0
See Also:
OneDayExecution, DailyExecution, WeeklyExecution, ScheduleExecutionFactory, ScheduleExecution, ExecutionTimeProvider

Method Summary
 int[] getSpecificDays()
          Returns the specific days of the month to execute the task on.
 int[] getSpecificMonths()
          Returns the specific months the task is to be executed during.
 void setSpecificDays(int[] specificDays)
          Sets the specific days of the month the task is to be executed on in the chosen months. 1-based, maximum is 31.
 void setSpecificMonths(int[] specificMonths)
          Sets the specific months the task is to be executed during.
 
Methods inherited from class com.inet.report.schedule.ScheduleExecution
getEndDate, getHour, getHourRange, getLoopCount, getMinute, getNextExecutionTime, getStartDate, setEndDate, setHourRange, setHourRange, setLoopCount, setStartDate, setStartTime
 

Method Detail

setSpecificMonths

public void setSpecificMonths(int[] specificMonths)
                       throws ScheduleException
Sets the specific months the task is to be executed during. One-based starting in January.
E.g. "January, July, August, and December" would be the int array {1,7,8,12}.

Parameters:
specificMonths - The specific months to execute the task during.
Throws:
ScheduleException - If the array is null or empty or if one of the months is not between 1 and 12.

getSpecificMonths

public int[] getSpecificMonths()
Returns the specific months the task is to be executed during.

Returns:
The specific months the task is to be executed during.

setSpecificDays

public void setSpecificDays(int[] specificDays)
                     throws ScheduleException
Sets the specific days of the month the task is to be executed on in the chosen months. 1-based, maximum is 31. If a certain day does not exist in one of the chosen months, it will be ignored for that month only.
E.g. if we have set months March, April, and July, and the days {20,31}, only dates March 20th, March 31st, April 20th, July 20th, and July 31st will be selected.

Parameters:
specificDays - The specific days of the month the task is to be executed on in the chosen months.
Throws:
ScheduleException - If the array is null or empty or if one of the days is not between 1 and 31.

getSpecificDays

public int[] getSpecificDays()
Returns the specific days of the month to execute the task on.

Returns:
The specific days of the month to execute the task on.

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH