About Time Windows

A Time Window (Configure > Automate > Calendar tools > Time Windows) defines a specific time range during which something can happen. For example, a Time Window can determine when a specific Job Definition is allowed to run.

Time Window Elements

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.

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.

On a Time Window element the "workday" ignores public holidays. You can combine two or more Time Windows to take workdays that fall on public holidays into account.

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 a Time Window's start date 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.

Standard Time Windows

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 holidays and fiscal periods.
  • System_CA: Canada holidays and fiscal periods.
  • System_DE: Germany (and German state) holidays and fiscal periods.
  • System_US: United States of America holidays and fiscal periods.
  • System_GB: Great Britain holidays and fiscal periods.
  • System_NL: Netherlands 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.Time Windows and Time Zones

Calendar Time Windows

A Calendar Time Windows is a Time Window that specifies days but not times. Calendar Time Windows are always open for the whole day. Calendar Time Windows are used in Time Window shifting. To make a Time Window a Calendar Time Window, check Is Calendar.

Calendar Time Windows have the following restrictions.

On the Calendar Time Window itself:

  • All referenced Time Windows must be Calendar Time Windows.
  • Time Zone cannot be set.

On the elements of a Calendar Time Window:

  • All referenced Time Windows must be Calendar Time Windows.
  • From and to dates and times cannot be set.
  • Time Zone cannot be set.

Note: Calendar Time Windows are evaluated in the time zone of each Job. The time zone of the process is the time zone specified in the Run Wizard. If a Job Definition is run from RedwoodScript, without a specific time zone, the central RunMyJobs server's time zone is used as the Job's time zone.

Daylight Saving Time (DST)

RunMyJobs has no issues with time changes that result in an hour of the day occurring twice or being skipped. If systems in your data center (usually SAP systems) run RunMyJobs Jobs and need to be shut down during such time changes, make sure you have held all the affected Queues before shutting down the SAP systems, because you do not want new Jobs to start. Wait until all Jobs have reached a final state before shutting the SAP systems down.

Also, you should avoid releasing all Queues simultaneously, or the SAP systems might get overloaded as soon as they become available.

Note: You can also use Time Windows to achieve the above without human intervention at the time of the time change.

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. For example, assume 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 Job 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 Job 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 because 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.

Wrapping

If you are using restrictions (for example, from Monday to Tuesday) and the from value comes after the to value, RunMyJobs will automatically wrap the time. For example:

  • Assume a range of months wraps around a year. For example, from November to February is 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) wraps between days. For example, from 23:00 (today) to 2:00 (tomorrow).

Note: Offsets are specified in hours and wrap at 24 hours.

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 Windows and Job Scheduling

Time Windows can be set on Queues, Queue Providers, and Job and Workflow Definitions. A submitted Job 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, RunMyJobs sets the Job to status Never. Note that a shutdown Job Server can also cause the Job to be put into status Never, because RunMyJobs cannot determine when the Job Server will be running again.

You prevent Jobs from starting too close to the closure of a Time Window by specifying a duration in milliseconds in the Min open time window duration to fit Job (MinimumOpenDurationExpression) field of a Job or Workflow Definition. The field accepts positive integers or REL expressions; JobDefinitionRuntimeLimit REL substitution parameters are available.

Presubmitted Processes

The Advanced Schedule Time Window and the process Time Window are intersected. The returned start times must match the result of the intersection.

  • Skip when time window is closed is true: Return only the calculated start times for which the intersection is open, skip if the intersection is closed.
  • Skip when time window is closed is false: Slide the result to the next opening to the intersection. If the Advanced Schedule element has an anchor time, try this time on the day of the result. Is the Time Window open, the anchor time is returned, otherwise the calculated opening of the intersection is used.

If the Queue has a Time Window, it is applied after the start time calculations. This implies that if the Queue Time Window is closed on the calculated start time, the start time slides to the next opening of the Queue Time Window. In this case, the anchor time is tried first as well.

Note: The Skip when time window is closed setting has an effect on both the Time Window of the Advanced Schedule and the Time Window of the Job.

Deleting Time Windows

You can delete Time Windows only if no other Objects have relationships with them. For example, if there are Jobs that have run with the Time Window, the Time Window cannot be deleted until those Jobs have been deleted. You can see all Jobs that relate to a Time Window under Related Objects in the Detail View.