About Time Windows
A Time Window defines a time interval in which something can occur: for example the time a specific Process Definition is allowed to run, the opening time of a Queue. A Time Window is made up of Time Window elements. Each of these elements defines a period of time. These elements can used fixed dates and times, rules such as "the first working day of the month", or a combination of both (dates and times and rules). A set of Time Window elements does not need be continuous.
The "enabled during" Time Window restricts the open period of Time Window to the open period of the "enabled during" Time Window. The "disabled during" Time Window restricts the open period of Time Window to the period where the "disabled during" Time Window is closed. This holds for both Time Window and Time Window element.
Time Windows are part of the 'Environment' section in the navigation bar. A number of standard Time Windows are provided with Redwood Server representing common holiday calendars and time periods. The prefixes used for these are:
- System_BE: Belgium specific holidays and fiscal periods.
- System_CA: Canada specific holidays and fiscal periods.
- System_DE: Germany (and German state) specific holidays and fiscal periods.
- System_US: United States of America specific holidays and fiscal periods.
- System_GB: Great Britain specific holidays and fiscal periods.
- System_NL: Netherlands specific holidays and fiscal periods.
- System_Christian: Christian holidays used in some countries.
- System_World: World holidays used in some countries.
- System_: other system Time Windows.
Note: Nesting of Time Windows should be kept to a minimum. When deep nesting is used, the processing time for the process can increase significantly.
Note: If the specified "day from" is after the last day of the month, it defaults to the last day of the month. This can have consequences for months with only 30 days and especially for February.
Note: When you define a Time Window that is valid in a single time zone, it is recommended to set that time zone in the Time Window.
Restricting Time Windows
A Time Window is closed all day every day, by default. Time Window elements are open all day, every day; so once you add one you use restrictions, for example from Monday to Tuesday or 9:00:00 AM to 5:00:00 PM, to customize it to your liking. These settings are set on Time Window elements and are cumulative; a Time Window with two elements, one of which is open on Tuesdays and the other on Wednesdays, is open on both days. All settings that are set on an individual Time Window element must intersect at some point, or that Time Window element will always be closed. A Time Window element has no effect on other Time Window elements. See the above table Tabs and Fields for a description of the fields on the Time Window Elements tab.
On a Time Window element the "workday" ignores public holidays; you combine two or more Time Windows to take workdays that fall on public holidays into account.
Daylight Saving Time (DST)
In the developed world, DST has been introduced to attempt to save energy. For computer systems this means an hour of the day occurs twice or is skipped. Redwood Server has no issues with time switches. If systems in your data-center run Redwood Server processes and need to be shut-down over the switch period (usually SAP systems), ensure you have held all the affected Queues before shutting down the SAP systems, as you do not want new processes to start. Please wait until all processes have reached a final state before shutting SAP systems down. Avoid releasing all Queues simultaneously, or the SAP systems might get overloaded as soon as they become available. You can also use Time Windows to achieve the above without human intervention at the time of the date-change.
Wrapping
When you use restrictions, for example from Monday to Tuesday, and the from value comes after the to value, Redwood Server will automatically wrap. The following list illustrates the behavior:
- A range of months wraps around a year, for example, from November to February will be interpreted as from November (this year) to February (next year)
- A range of days of the month (with an offset) wraps around a month, for example from 26 (this month) to 5 (next month)
- A range of weekdays (with an offset) wraps until the following week.
- A range of times of day (with an offset allowing to cross midnight) from 23:00 (today) to 2:00 (tomorrow)
Note: Offsets are specified in hours and wrap at 24.
Day Rollover
The day rollover is an offset in hours of midnight. When set on a Time Window, it affects any enabled during Time Window and any period function if they are open from midnight to midnight. Example: in 2016, Easter Sunday falls on 27th March. You want the Time Window to be open Easter Sunday 9:00 PM to Easter Monday 9:00 PM. You create a Time Window open all day, set the enabled during Time Window to System_Christian_Easter and a day rollover of 21:00:00
.
This works with any Time Window that is open from midnight to midnight; all Calendar Time Windows fall into this category.
Note: When multiple related Time Windows have different day rollovers, the latest (as in maximum) day rollover is used for the entire calculation.
Time Window Preview
In the preview pane of a Time Window, a calendar displays the current month and the days and time the currently selected Time Window is open. It shows the time of the current day by default but different days, months, and years can be selected. It shows a blue bar when a Time Window is open, a light blue bar when a Time Window opens and a white bar when the Time Window is closed. This can help fine tune a Time Window and can help you make sure you have made no mistakes when you created the Time Window.
The time scale below the calendar shows the time of the currently selected day the Time Window is open,
An overview table is displayed on the right-hand side and gives you an overview over all the times and dates of the current month the Time Window opens and closes as well as the previous open period and next open period, before and after current month, respectively.
Time Windows and Process Scheduling
Time Windows can be set on Queues, Queue providers, and processes. A submitted process will start at the next intersection of all Time Windows involved. If all involved Time Windows are not all open at a specific point in time in their respective time zones over the coming two years, Redwood Server sets the process to status Never. Note that a shutdown Process Server can also cause the process to be put into status Never as Redwood Server cannot determine when the Process Server will be running again.
Note: Not all regions observe DST changes, so a setup that appears to be working as designed at any given time should be thoroughly tested for time changes.
You prevent processes from starting too close to the closure of a Time Window by specifying a duration in milliseconds Min open time window duration to fit process ( MinimumOpenDurationExpression
) field of a Process Definition or process. The field accepts positive integers or REL expressions; JobDefinitionRuntimeLimit
REL substitution parameters are available.
DST Changes
You have a data process that needs to feed data from a data center in Paris to a data center in Karachi, Pakistan. Due to the current offset (April), you want the data to be processed at 3:00AM in Europe/Paris, which is 6:00AM in Asia/Karachi. A process sends the data to a file server in Karachi where it is picked up by another process that dumps it into your BI system. You create a Time Window that is open Sundays between 3:00AM and 3:59AM in Europe/Paris and set it on the Process Definition that retrieves the data from the Paris data center. The technicians in Karachi create a Time Window that is open from 6:00AM to 6:59AM and set it onto the Process Definition that is supposed to load the data into the BI system.
After the DST change in Paris in late October, the file event in Karachi that was supposed to start the second process fires too late. The process cannot be run anymore since the Time Windows no longer overlap. Besides, the first employees have started work already and are using the target system which now contains outdated data.