Package com.uc4.api.objects
Class ExecuteRecurring
java.lang.Object
com.uc4.api.objects.ExecuteRecurring
Recurring definition of a task.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newExecuteRecurring
instance with the default setting to execute the task every 30 minutes on each weekday.ExecuteRecurring
(UC4ObjectName uc4ObjectNamme) Constructs a newExecuteRecurring
instance by also providing the uc4 object name of the recurring object with the default setting to execute the task every 30 minutes on each weekday. -
Method Summary
Modifier and TypeMethodDescriptionclone()
getAlias()
Returns the alias ornull
if it has not been set.Returns the calendar condition which has been set using the methodsetCalendarCondition(TaskCalendar)
.int
int
int
getName()
Returns the name ornull
if it has not been set.Description of the periodic cycle in which executions are triggered.getQueue()
Returns the Queue Object.Returns the end date of the date range which has been set using the methodsetDateRange
.Returns the start date of of the date range which has been set using the methodsetDateRange
.Returns the end time which was set using the methodsetTimeframe
.Returns the start time which was set using the methodsetTimeframe
.Returns the start time that has been set using the methodsetAtTime
.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isFriday()
boolean
isMonday()
boolean
boolean
isSunday()
boolean
boolean
boolean
boolean
Returns true if the task runs based on calendar conditions.boolean
Returns true if the task runs on defined week days.void
Sets the alias of a recurring task.void
setAllowOneOverlap
(boolean overlap) Sets if one overlap should be allowed.void
Sets the start time of the task.void
setCalendarCondition
(TaskCalendar calendar) Sets the calendar condition of the recurring tasks.void
setDateRange
(DateTime startDate, int runs) Sets a date range using a start date and a number of runs.void
setDateRange
(DateTime startDate, DateTime endDate) Sets the date range for the interval.void
setExecutionInterval
(int every) Sets the execution interval in minutes.void
setGapToPreviousRun
(int gap) Sets the gap to the previous run of the task in minutes.void
Sets the time of the once fieldvoid
setPeriodDescription
(String periodDescription) Sets the description that describes the execution cycle of this instance.void
setQueue
(UC4ObjectName queue) Sets the Queue that will be used when this Automation Engine object is executed.void
setRangeWithoutEnd
(DateTime startDate) Sets a date range with a start date and an open end date.void
setTimeframe
(Time start, Time end, boolean forceAdjustment) Sets the execution time frame.void
Sets the time zone of all dates used in this class.void
setWeekDays
(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su) Sets Weekdays.void
Only for internal use.
-
Constructor Details
-
ExecuteRecurring
public ExecuteRecurring()Constructs a newExecuteRecurring
instance with the default setting to execute the task every 30 minutes on each weekday. -
ExecuteRecurring
Constructs a newExecuteRecurring
instance by also providing the uc4 object name of the recurring object with the default setting to execute the task every 30 minutes on each weekday.- Parameters:
uc4ObjectNamme
- The name of the UC4 object
-
-
Method Details
-
clone
-
getAlias
Returns the alias ornull
if it has not been set. -
setAlias
Sets the alias of a recurring task.- Parameters:
alias
- UC4 Alias
-
setTimeframe
Sets the execution time frame.- Parameters:
start
- Start timeend
- End timeforceAdjustment
- Aligns the start time on the time frame if set to true
-
getTimeframeStart
Returns the start time which was set using the methodsetTimeframe
.- Returns:
- Start time of the Time frame
-
getQueue
Returns the Queue Object.- Returns:
- Name of the Queue Object
-
setQueue
Sets the Queue that will be used when this Automation Engine object is executed.- Parameters:
queue
- Name of the Queue Object
-
getTimeframeEnd
Returns the end time which was set using the methodsetTimeframe
.- Returns:
- End time of the Time frame
-
hasTimeframeAdjustment
public boolean hasTimeframeAdjustment()- Returns:
- True if the start time is aligned to the time frame
-
setExecutionInterval
public void setExecutionInterval(int every) Sets the execution interval in minutes.- Parameters:
every
- Number of minutes of the execution interval
-
isExecutedInterval
public boolean isExecutedInterval()- Returns:
- Returns true if an execution interval has been set.
-
getExecutionInterval
public int getExecutionInterval()- Returns:
- Returns the execution interval in minutes.
-
setGapToPreviousRun
public void setGapToPreviousRun(int gap) Sets the gap to the previous run of the task in minutes.- Parameters:
gap
- Time gap in minutes
-
isExecutedWithGap
public boolean isExecutedWithGap()- Returns:
- Returns true if the interval has a gap to the previous run.
-
getGapInterval
public int getGapInterval()- Returns:
- Returns the time gap in minutes to the previous run.
-
setAtTime
Sets the start time of the task.- Parameters:
time
- Start time
-
setOnce
Sets the time of the once field- Parameters:
time
- Start time of the once execution
-
getTimeOfSingleExecution
Returns the start time that has been set using the methodsetAtTime
.- Returns:
- Start time of the execution
-
isExecutedAtTime
public boolean isExecutedAtTime()- Returns:
- Returns true if the task is executed at a defined time (the method setAtTime has been called before)
-
setAllowOneOverlap
public void setAllowOneOverlap(boolean overlap) Sets if one overlap should be allowed. If the parameteroverlap
is set tofalse
there will only be one task at one time even if the old run has not finished.- Parameters:
overlap
- True if one overlap is allowed
-
isAllowOneOverlap
public boolean isAllowOneOverlap()- Returns:
- Returns True if one overlap is allowed
-
setTimeZone
Sets the time zone of all dates used in this class.- Parameters:
tz
- Time zone
-
getTimeZone
- Returns:
- Returns the time zone name or an empty name if the default is used.
-
setDateRange
Sets the date range for the interval.- Parameters:
startDate
- Start dateendDate
- End date
-
hasDateRangeWithEndTime
public boolean hasDateRangeWithEndTime()- Returns:
- True if a date range was specified using a start date and an end date
-
getRangeStartDate
Returns the start date of of the date range which has been set using the methodsetDateRange
.- Returns:
- Start Date
-
getRangeEndDate
Returns the end date of the date range which has been set using the methodsetDateRange
.- Returns:
- End date
-
setRangeWithoutEnd
Sets a date range with a start date and an open end date.- Parameters:
startDate
- start date
-
hasDateRangeWithoutEnd
public boolean hasDateRangeWithoutEnd()- Returns:
- Returns true if the date range was specified only by a start date
-
setDateRange
Sets a date range using a start date and a number of runs.- Parameters:
startDate
- Start dateruns
- Number of run
-
getDateRangeRuns
public int getDateRangeRuns()- Returns:
- Returns the number of runs of the date range.
-
hasDateRangeRuns
public boolean hasDateRangeRuns()- Returns:
- Returns true if the date range was specified using a start date and a number of runs.
-
setCalendarCondition
Sets the calendar condition of the recurring tasks.- Parameters:
calendar
- Calendar condition
-
getCalendarCondition
Returns the calendar condition which has been set using the methodsetCalendarCondition(TaskCalendar)
.- Returns:
- Calendar condition
-
setWeekDays
public void setWeekDays(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su) Sets Weekdays.- Parameters:
mo
- Mondaytu
- Tuesdaywe
- Wednesdayth
- Thursdayfr
- Fridaysa
- Saturdaysu
- Sunday
-
runsOnDefinedWeekdays
public boolean runsOnDefinedWeekdays()Returns true if the task runs on defined week days. This method returnstrue
ifsetWeekDays
has been called before.Note: When this method returns true, calls to
runsOnDefinedCalendar()
will return false.- Returns:
- True if weekdays are used as calendar condition
-
runsOnDefinedCalendar
public boolean runsOnDefinedCalendar()Returns true if the task runs based on calendar conditions. This method returnstrue
ifsetCalendarCondition(TaskCalendar)
has been called before.Note: When this method returns true, calls to
runsOnDefinedWeekdays()
will return false.- Returns:
- Returns true if the task runs on defined calendar conditions
-
isSunday
public boolean isSunday()- Returns:
- True if sunday is selected and the task runs on weekdays
-
isMonday
public boolean isMonday()- Returns:
- True if monday is selected and the task runs on weekdays
-
isTuesday
public boolean isTuesday()- Returns:
- True if tuesday is selected and the task runs on weekdays
-
isWednesday
public boolean isWednesday()- Returns:
- True if wednesday is selected and the task runs on weekdays
-
isThursday
public boolean isThursday()- Returns:
- True if thursday is selected and the task runs on weekdays
-
isFriday
public boolean isFriday()- Returns:
- True if friday is selected and the task runs on weekdays
-
isSaturday
public boolean isSaturday()- Returns:
- True if saturday is selected and the task runs on weekdays
-
store
Only for internal use.Stores the content of this class under the specified XML element in
doc
.- Parameters:
doc
- XML DocumentexecPeriod
- Element
-
setPeriodDescription
Sets the description that describes the execution cycle of this instance.- Parameters:
periodDescription
- The new description.- Throws:
IllegalArgumentException
- whenperiodDescription
is longer than 255 characters.
-
getPeriodDescription
Description of the periodic cycle in which executions are triggered. When this object is based on aPeriod
instance, the period description is initialized with title of thePeriod
instance.- Returns:
- Description for this object, or
null
if no description has been specified. - See Also:
-
getName
Returns the name ornull
if it has not been set.- Returns:
- UC4 Name
-