Creating run cycles
- A rule with
a format such as
The SECOND TUESDAY of every MONTH
, where the words in capitals are selected from lists of ordinal numbers, types of day, and cycle or period names, respectively. - A combination of period and offset. For example, an offset of 1 in a weekly period specifies Monday. An offset of 10 in a monthly period specifies the tenth day of each month.
- A run cycle group that was previously defined in the database with the RUN CYCLE option in the MAINTAINING HWA DATA BASES panel.
Run cycles can also be negative, when they specify the days that the application must not run. You can specify many run cycles, both positive and negative, when you create an application. Add positive run cycles to generate more days, or to have multiple occurrences on the same day, and add negative run cycles to exclude days already generated. You can mix run cycles that use offsets and run cycles that use rules.
A negative run cycle prevents any positive run cycle from generating an occurrence with an input arrival date and time that matches any date/time combination that the negative run cycle generates.
If you run work at fixed days of the week, month, or year, and take one of the standard HCL Workload Automation for Z actions when this day falls on a free day (holiday), you do not need to create any periods. These are examples of rules:
Rule | Interpretation and notes |
---|---|
Only first Sunday in June | The first Sunday in June every year. |
Only work day in the week | The (first) work day (specified by the calendar) in every week. First is default. |
Only last Friday in the year | The last Friday in every year. |
Only second Friday in the year and in April | The second Friday in the year and
the second Friday in April. This is a complex rule specifying two
cycles (year and April) that could equally well be split into two
simple rules: Only second Friday in year,and Only second Friday in April. |
Only second free day in semester | The second free day (specified by the calendar) in every interval of the period called semester. |
Every second Monday in the month | The first, third, and fifth (if present)
Monday in every month. Be careful not to specify this when you mean Only the second Monday in the month.When you specify Every second x,HCL Workload Automation for Z starts at the origin of x and builds a series 1, 3, 5, and so on. |
Every first work day in the year | Every work day in every year. The firstmeans that the series has an interval of one. Do not confuse this with Only (first) work day in the year. |
Only 2nd last work day in the month | The last work day but one (second to last) in every month. |
Every third fourth day in the year | Every third day gives January 1, 4, 7, 10, 13 etc. Every fourth day gives January 1, 5, 9, 13, 17 etc. The rule combines these and removes duplicates, giving January 1, 4, 5, 7, 9, 10, 13, 17 etc. |
Every last Monday in the month | This generates every Monday, because HCL Workload Automation for Z generates a series of Mondays starting from the last Monday. If you want only the last Monday in the month, specify Only last Monday. |
Every 3rd last work day in the month shift origin 1 | This generates a series from the last day but 1 of each month. For July, for example, July 31 is not selected, but the first work day before July 31 is selected. The next two work days are skipped, then the next work day is selected, and so on (the free day rule is not relevant here). |
Every third last free day in the month shift origin 1 | This also generates a series from the last day but 1 of each month. For July, for example, July 31 is not selected, but the first free day before July 31 is selected. The next two free days are skipped, then the next free day is selected, and so on. The actual days generated, however, depend on the free-day rule. The result can be confusing unless you use rule 3 when selecting free days. |
Note: The only period
that you need for the above examples is semester. Words such as week,
month, year, April, June, and July are part of the cycle definition,
and you do not have to create periods with these names. |
For an application to be automatically selected by the planning process, it must contain a run cycle, specified either in the application itself or in its group definition, if it belongs to a group. The run cycle must also be in effect for the duration of the plan (that is, the in-effect dates of the run cycle must fall within the range covered by the plan).