PL/SQL API jcs_odf.create_time_window_element
Summary
Add an element to a time_window.
Specification
procedure create_time_window_element(time_window_name in varchar2,
element in number default const.def_num,
time_from in varchar2 default const.def_str,
time_to in varchar2 default const.def_str,
day_from in number default const.def_num,
day_to in number default const.def_num,
weekday_from in number default const.def_num,
weekday_to in number default const.def_num,
week_from in number default const.def_num,
week_to in number default const.def_num,
month_from in number default const.def_num,
month_to in number default const.def_num,
date_from in date default const.def_date,
date_to in date default const.def_date,
enabled_during in varchar2 default const.def_str,
disabled_during in varchar2 default const.def_str,
period_function_name in varchar2 default const.def_str,
number_from in number default const.def_num,
number_to in number default const.def_num,
string_argument_1 in varchar2 default const.def_str,
time_wrap in varchar2 default const.def_str,
timezone_name in varchar2 default const.def_str,
time_window_partition in varchar2 default const.def_str,
enabled_during_partition in varchar2 default const.def_str,
disabled_during_partition in varchar2 default const.def_str,
for_period in number default const.def_num,
for_type in varchar2 default const.def_str)
Parameters
- time_window_name - the name of the time window
- element - the number of the time window element
- time_from - activation time - input format is 'HH:MI' (24-hours)
- time_to - de-activation time - input format is 'HH:MI' (24-hours)
- day_from - activation day
- day_to - de-activation day
- weekday_from - activation weekday
- weekday_to - de-activation weekday
- week_from - activation week
- week_to - de-activation week
- month_from - activation month (1..12)
- month_to - de-activation month (1..12)
- date_from - activation date - input format is "DD-MM-YYYY'
- date_to - de-activation date - input format is 'DD-MM-YYYY'
- enabled_during - the name of the time interval can be active during another time window - this mechanism enables recursive time windowing
- disabled_during - the name of the time interval can be disabled during another time window - this enables the definition of e.g. holiday calendars to prevent job execution on certain days, such as public holidays
- period_function_name - the name of the period function to use - the default period functions are:
- TIME_WINDOW_BUILTIN_DAY - the number of the day within the month (for example: day 12)
- TIME_WINDOW_BUILTIN_DAYINWEEK - the name and sequence of the day within the month (for example: the first Monday)
- TIME_WINDOW_BUILTIN_WEEKDAY - the name of the day within the week (for example: Workday)
- TWB_LAST_DAY_IN_MONTH - a period defined by the number of days before the last day of the month
- TWB_LAST_WORKDAY_IN_MONTH - a period defined by the number of days before the last working day of the month
- TWB_WORKDAY_IN_MONTH - calculates the period between the two given workdays in the month. If there is a disabling time window, the given period just becomes smaller or is divided into two or more smaller periods. No shift takes place.
- WORKDAY_IN_MONTH_EX - a demonstration function in demo/workday_in_month_ex.sql that calculates the first workday that is on or after workday [x] that is not excluded by the disabling time window. Thus if the disabling time window contains holidays, you get the "real" [x] workday.
note
You can add your own period functions to the repository. This will enable you to use your own periods in the time window functions, such as last workday of my 4-week financial period.
- number_from -
- number_to -
- string_argument_1 -
- time_wrap - allow time interval to end in the next day - can be set only if time_to < time_from
- timezone_name - the timezone this time window element should be interpreted in if it is not defined the time window's timezone is used
- time_window_partition - the partition of the time window
- enabled_during_partition - the partition of the time interval can be active during another time window - this mechanism enables recursive time windowing
- disabled_during_partition - the partition of the time interval can be disabled during another time window - this enables the definition of e.g. holiday calendars to prevent job execution on certain days, such as public holidays
- for_period - The amount of periods for the duration
- for_type - The type of periods for the duration (M)onths, (D)ays, H(ours) or m(inutes)
You can specify either:
- day_from and optionally day_to
- weekday_from and optionally weekday_to
- weekday_from and week_from and optionally weekday_to and week_to
If you specify both, one of the others may silently be ignored.
See Also
- jcs_odf.create_time_window
- jcs_odf.alter_time_window
- jcs_odf.drop_time_window
- jcs_odf.drop_time_window_element
plsqlTopic
onsiteTopic