Run cycle group definition
A run cycle group is a database object within which one or more run cycles is defined. The run cycles combined together produce a set of run dates for a job stream. Each run cycle group definition has the following format and arguments:
Syntax
$runcyclegroup
runcyclegroupname [“description”]
vartable tablename
[freedays calendarname [-sa] [-su]]
[on [runcycle name]
[validfrom date] [validto date]
[description ”text”]
[vartable table_name]
{date|day|calendar|request|”icalendar”} [,...]
[fdignore|fdnext|fdprev][subset subsetname AND|OR]
[({at time [+n day[s]] |
schedtime time [+n day[s]]}
[until time [+n day[s]] [onuntil action]]
[deadline time [+n day[s]]])]]
[,...]
[except [runcycle name]
[validfrom date] [validto date]
[description ”text”]
{date|day|calendar|request|”icalendar”} [,...]
[fdignore|fdnext|fdprev][subset subsetname AND|OR]
[{(at time [+n day[s]])] |
(schedtime time [+n day[s]])}]
[,...]
[{at time [timezone|tz tzname] [+n day[s]] |
schedtime time [timezone|tz tzname] [+n day[s]]}]
[until time [timezone|tz tzname] [+n day[s]] [onuntil action]]
[deadline time [timezone|tz tzname] [+n day[s]]]
end
Arguments
- runcyclegroupname
- Specifies the name of the run cycle group. The name can contain up to eight alphanumeric characters, including dashes (-) and underscores (_), and must start with a letter.
- “description”
- Provides a description of the run cycle group. The description can contain up to 120 alphanumeric characters. It must be enclosed in double quotes. It can contain alphanumeric characters as long as it starts with a letter. It can contain the following characters: comma (,), period (.), dash (-), plus (+), single quote ('), and equal (=). It cannot contain double quotes (") other than the enclosing ones, colon (:), semi-colon (;), and ampersand (&).
- vartable tablename
- The name of the variable table. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores. It can contain up to 80 characters.
- [freedays Calendar_Name [-sa] [-su]]
- Specifies a freeday calendar for calculating workdays for the
job stream. It can also set Saturdays and Sundays as workdays.
- Calendar_Name
- The name of the calendar that must be used as the non-working days calendar for the job stream. If Calendar_Name is not in the database, Tivoli® Workload Scheduler issues a warning message when you save the job stream. If Calendar_Name is not in the database when the command schedulr runs, Tivoli Workload Scheduler issues an error message and uses the default calendar holidays in its place. Do not use the names of weekdays for the calendar names.
- -sa
- Saturdays are workdays.
- -su
- Sundays are workdays.
- runcycle name
- Specifies a label with a friendly name for the run cycle specified in the following lines.
- valid from date ... valid to date
- Delimits the time frame during which the job stream is active, that is the job stream is added to the production plan. Note that the date specified as valid to value is not included in the run cycle, therefore on this date the job stream is not active.
- description ”text”
- Contains a description of the run cycle.
- vartable
- Specifies the name of the variable table to be used by the run cycle.
- date
- Specifies a run cycle that runs on specific
dates. The syntax used for this type is:
yyyymmdd [,yyyymmdd][,...]
For example, for a job stream that is scheduled to run on the 25th of May 2009 and on the 12th of June 2009 the value is:on 20090525,20090612
- day
- Specifies a run cycle that
runs on specific days. The syntax used for this type is:
{mo|tu|we|th|fr|sa|su}
For example, for a job stream that is scheduled to run every Monday the value is:on mo
- calendar
- The dates specified in a calendar with
this name. The calendar name can be followed by an offset in the following
format:
{+ | -}n {day[s] | weekday[s] | workday[s]}
Where:
- n
- The number of days, weekdays, or workdays.
- days
- Every day of the week.
- weekdays
- Every day of the week, except Saturday and Sunday.
- workdays
- Every day of the week, except for Saturdays and Sundays (unless otherwise specified with the freedays keyword) and for the dates marked either in a designated non-working days calendar or in the holidays calendar.
- request
- Selects the job stream only when requested. This is used for job
streams that are selected by name rather than date. To prevent a scheduled
job stream from being selected for JnextPlan, change its definition
to ON REQUEST. Note: When attempting to run a job stream that contains "on request" times, consider that:
- "On request" always takes precedence over "at".
- "On request" never takes precedence over "on".
- icalendar
- Represents a standard used to specify
a recurring rule that describes when a job stream runs.
The syntax used for run cycle with type icalendar is the following:
FREQ={DAYLY|WEEKLY|MONTHLY|YEARLY}
[;INTERVAL=[-]n]
[;{BYFREEDAY|BYWORKDAY|BYDAY=weekday_list|
BYMONTHDAY=monthday_list}]
where the default value for keyword INTERVAL is 1.
Using icalendar you can specify that a job stream runs:- every n days
- by using the following format:
FREQ=DAILY[;INTERVAL=n]
where the value set for valid from is the first day of the resulting dates.
For example, for a job stream that is scheduled to run daily the value is:
For a job stream that is scheduled to run every second day the value is:FREQ=DAILY
FREQ=DAILY;INTERVAL=2
- every free or work days
- by using the following format:
FREQ=DAILY[;INTERVAL=n]
;BYFREEDAY|BYWORKDAY
For example, for a job stream that is scheduled to run every non-working day the value is:
For a job stream that is scheduled to run every second workday the value is:FREQ=DAILY;BYFREEDAY
FREQ=DAILY;INTERVAL=2;BYWORKDAY
- every n weeks on specific weekdays
- by using the following format:
FREQ=WEEKLY[;INTERVAL=n]
;BYDAY=weekday_list
where the value set for weekday_list is[SU][,MO][,TU][,WE][,TH][,FR][,SA]
For example, for a job stream that is scheduled to run every week on Friday and Saturday the value is:
For a job stream that is scheduled to run every three weeks on Friday the value is:FREQ=WEEKLY;BYDAY=FR,SA
FREQ=WEEKLY;INTERVAL=3;BYDAY=FR
- every n months on specific dates of the month
- by using the following format:
FREQ=MONTHLY[;INTERVAL=n]
;BYMONTHDAY=monthday_list
where the value set for monthday_list is represented by a list of[+number_of_day_from_beginning_of_month] [-number_of_day_from_end_of_month] [number_of_day_of_the_month]
For example, for a job stream that is scheduled to run monthly on the 27th day the value is:
For a job stream that is scheduled to run every six months on the 15th and on the last day of the month the value is:FREQ=MONTHLY;BYMONTHDAY=27
FREQ=MONTHLY;INTERVAL=6;BYMONTHDAY=15,-1
- every n months on specific days of specific weeks
- by using the following format:
FREQ=MONTHLY[;INTERVAL=n]
;BYDAY=day_of_m_week_list
where the value set for day_of_m_week_list is represented by a list of[+number_of_week_from_beginning_of_month] [-number_of_week_from_end_of_month] [weekday]
For example, for a job stream that is scheduled to run monthly on the first Monday and on the last Friday the value is:
For a job stream that is scheduled to run every six months on the 2nd Tuesday the value is:FREQ=MONTHLY;BYDAY=1MO,-1FR
FREQ=MONTHLY;INTERVAL=6;BYDAY=2TU
- every n years
- by using the following format:
FREQ=YEARLY[;INTERVAL=n]
where the value set for valid from is the first day of the resulting dates.
For example, for a job stream that is scheduled to run yearly the value is:
For a job stream that is scheduled to run every two years the value is:FREQ=YEARLY
FREQ=YEARLY;INTERVAL=2
- fdignore|fdnext|fdprev
- Indicates
the rule to be applied if the date selected for running the job or
job stream falls on a non-working day. The available settings are:
- fdignore
- Do not add the date.
- fdnext
- Add the nearest workday after the non-working day.
- fdprev
- Add the nearest workday before the non-working day.
- [subset subsetname AND|OR]
- subset subsetname
- Specifies the name of the subset. If you do not specify a name, SUBSET_1, is used by default.
- AND|OR
- By default, run cycles within a subset are in a logical OR relationship but you can change it to a logical AND, as long as the run cycle group result is a positive date or set of dates (Inclusive).
- runcycle name
- Specifies a label with a friendly name for the run cycle specified in the following lines.
- valid from date ... valid to date
- Delimits the time frame during which the job stream is active, that is the job stream is added to the production plan. Note that the date specified as valid to value is not included in the run cycle, therefore on this date the job stream is not active.
- description ”text”
- Contains a description of the run cycle.
- date
- Specifies a run cycle that runs on specific
dates. The syntax used for this type is:
yyyymmdd [,yyyymmdd][,...]
For example, for a job stream that is scheduled to run on the 25th of May 2009 and on the 12th of June 2009 the value is:on 20090525,20090612
- day
- Specifies a run cycle that
runs on specific days. The syntax used for this type is:
{mo|tu|we|th|fr|sa|su}
For example, for a job stream that is scheduled to run every Monday the value is:on mo
- calendar
- The dates specified in a calendar with
this name. The calendar name can be followed by an offset in the following
format:
{+ | -}n {day[s] | weekday[s] | workday[s]}
Where:
- n
- The number of days, weekdays, or workdays.
- days
- Every day of the week.
- weekdays
- Every day of the week, except Saturday and Sunday.
- workdays
- Every day of the week, except for Saturdays and Sundays (unless otherwise specified with the freedays keyword) and for the dates marked either in a designated non-working days calendar or in the holidays calendar.
- request
- Selects the job stream only when requested. This is used for job
streams that are selected by name rather than date. To prevent a scheduled
job stream from being selected for JnextPlan, change its definition
to ON REQUEST. Note: When attempting to run a job stream that contains "on request" times, consider that:
- "On request" always takes precedence over "at".
- "On request" never takes precedence over "on".
- icalendar
- Represents a standard used to specify
a recurring rule that describes when a job stream runs.
The syntax used for run cycle with type icalendar is the following:
FREQ={DAYLY|WEEKLY|MONTHLY|YEARLY}
[;INTERVAL=[-]n]
[;{BYFREEDAY|BYWORKDAY|BYDAY=weekday_list|
BYMONTHDAY=monthday_list}]
where the default value for keyword INTERVAL is 1.
Using icalendar you can specify that a job stream runs:- every n days
- by using the following format:
FREQ=DAILY[;INTERVAL=n]
where the value set for valid from is the first day of the resulting dates.
For example, for a job stream that is scheduled to run daily the value is:
For a job stream that is scheduled to run every second day the value is:FREQ=DAILY
FREQ=DAILY;INTERVAL=2
- every free or work days
- by using the following format:
FREQ=DAILY[;INTERVAL=n]
;BYFREEDAY|BYWORKDAY
For example, for a job stream that is scheduled to run every non-working day the value is:
For a job stream that is scheduled to run every second workday the value is:FREQ=DAILY;BYFREEDAY
FREQ=DAILY;INTERVAL=2;BYWORKDAY
- every n weeks on specific weekdays
- by using the following format:
FREQ=WEEKLY[;INTERVAL=n]
;BYDAY=weekday_list
where the value set for weekday_list is[SU][,MO][,TU][,WE][,TH][,FR][,SA]
For example, for a job stream that is scheduled to run every week on Friday and Saturday the value is:
For a job stream that is scheduled to run every three weeks on Friday the value is:FREQ=WEEKLY;BYDAY=FR,SA
FREQ=WEEKLY;INTERVAL=3;BYDAY=FR
- every n months on specific dates of the month
- by using the following format:
FREQ=MONTHLY[;INTERVAL=n]
;BYMONTHDAY=monthday_list
where the value set for monthday_list is represented by a list of[+number_of_day_from_beginning_of_month] [-number_of_day_from_end_of_month] [number_of_day_of_the_month]
For example, for a job stream that is scheduled to run monthly on the 27th day the value is:
For a job stream that is scheduled to run every six months on the 15th and on the last day of the month the value is:FREQ=MONTHLY;BYMONTHDAY=27
FREQ=MONTHLY;INTERVAL=6;BYMONTHDAY=15,-1
- every n months on specific days of specific weeks
- by using the following format:
FREQ=MONTHLY[;INTERVAL=n]
;BYDAY=day_of_m_week_list
where the value set for day_of_m_week_list is represented by a list of[+number_of_week_from_beginning_of_month] [-number_of_week_from_end_of_month] [weekday]
For example, for a job stream that is scheduled to run monthly on the first Monday and on the last Friday the value is:
For a job stream that is scheduled to run every six months on the 2nd Tuesday the value is:FREQ=MONTHLY;BYDAY=1MO,-1FR
FREQ=MONTHLY;INTERVAL=6;BYDAY=2TU
- every n years
- by using the following format:
FREQ=YEARLY[;INTERVAL=n]
where the value set for valid from is the first day of the resulting dates.
For example, for a job stream that is scheduled to run yearly the value is:
For a job stream that is scheduled to run every two years the value is:FREQ=YEARLY
FREQ=YEARLY;INTERVAL=2
- fdignore|fdnext|fdprev
- Specifies
a rule that must be applied when the date selected for exclusion falls
on a non-working day. It can be one of the following:
- fdignore
- Do not exclude the date.
- fdnext
- Exclude the nearest workday after the non-working day.
- fdprev
- Exclude the nearest workday before the non-working day.
- subset subsetname
- Specifies the name of the subset. If you do not specify a name, SUBSET_1, is used by default.
- AND|OR
- By default, run cycles within a subset are in a logical OR relationship but you can change it to a logical AND, as long as the run cycle group result is a positive date or set of dates (Inclusive).
Example
- An inclusive run cycle RUN_CYCLE1
- where,
- The calendar, CAL1, defines days that should be considered non-working days for the job stream. Saturday and Sunday are declared working days.
- The job stream runs not earlier than two days after March 31, 2008 (April 2), and not later than two days after April 12, 2008 ( April 14). Every day, the job stream is delayed by two days.
- The job streams runs every day (after the two-day delay) beginning at 7 a.m. and it cannot start later than 9 a.m., otherwise, it is suppressed and does not run at all. The job stream should complete by 10 a.m.
- An exclusive run cycle, RUN_CYCLE2
- If the job stream falls on a non-working day, then the nearest workday before the non-working day is excluded.
- If the job stream falls on April 1, 2008, and this day happens to be a non-working day, then the nearest workday after the non-working day is excluded.
- An exclusive run cycle, RUN_CYCLE3
- If the job stream falls on April 1, 2008, and this day happens to be a non-working day, then the nearest workday after the non-working day is excluded.
RUNCYCLEGROUP RCG2
DESCRIPTION "Sample RunCycle Group"
VARTABLE TABLE1
FREEDAYS CAL1 -SA -SU
ON RUNCYCLE RUN_CYCLE1 VALIDFROM 03/31/2008 VALIDTO 04/12/2008 DESCRIPTION
"Inclusive Run Cycle" VARTABLE TABLE1 "FREQ=DAILY;" FDIGNORE
(AT 0700 +2 DAYS UNTIL 0900 +2 DAYS ONUNTIL SUPPR DEADLINE 1000 +2 DAYS)
EXCEPT RUNCYCLE RUN_CYCLE2 VALIDFROM 03/31/2008 VALIDTO 04/12/2008 DESCRIPTION
"Exclusive Run Cycle" CAL1 FDPREV SUBSET SUBSET_A AND
(AT 0700 +2 DAYS)
EXCEPT RUNCYCLE RUN_CYCLE3 VALIDFROM 03/31/2008 VALIDTO 04/12/2008 DESCRIPTION
"Exclusive Run Cycle" 04/01/2008 FDNEXT SUBSET SUBSET_A AND
(SCHEDTIME 0700 +2 DAYS)
SCHEDTIME 0700 TZ Europe/Berlin +2 DAYS UNTIL 0900 TZ Europe/Berlin +2 DAYS ONUNTIL
CONT DEADLINE 1000 TZ Europe/Berlin +2 DAYS
END
See also
From the Dynamic Workload Console you can perform the same task as described in:
Creating and managing run cycle groups and their run cycles.