ajscalendar
- Organization of this page
Format
ajscalendar [-F service-name] [-lt {hour:minute|none|no}] [-ld {day|none|no|{sun|su|mon|mo|tue| tu|wed|we|thu|th|fri|fr|sat|sa}:n}] [-md {this|th|next|ne|none|no}] [-c] [-op {sun|su|mon|mo|tue|tu|wed|we| thu|th|fri|fr|sat|sa| {year/month/{day| {sun|su|mon|mo|tue|tu|wed|we| thu|th|fri|fr|sat|sa}[:n]}}}] [-cl {sun|su|mon|mo|tue|tu|wed|we| thu|th|fri|fr|sat|sa| {year/month/{day| {sun|su|mon|mo|tue|tu|wed|we| thu|th|fri|fr|sat|sa}[:n]}}}] [-no {sun|su|mon|mo|tue|tu|wed|we| thu|th|fri|fr|sat|sa|{year/month/{day| {sun|su|mon|mo|tue| tu|wed|we|thu|th|fri|fr|sat|sa} [:n]}}}] [-of open-day-information-file-name] [-cf closed-day-information-file-name] [-nf canceled-day-information-file-name] [-df calendar-information-file-name] [-d year/month/day] [-R] job-group-name...
Description
Defines calendar information for a job group.
Execution privileges
You must have any of the following JP1 privileges:
-
JP1_AJS_Admin privilege
-
JP1_AJS_Manager privilege
-
JP1_AJS_Editor privilege
Arguments
-F service-name
Specify the name of the target scheduler service.
You can specify a character string of 1 to 30 bytes.
-lt {hour:minute|none|no}
Set the base time for the calendar.
-
hour:minute
You can specify a value between 0 and 23 for the hour.
You can specify a value between 0 and 59 for the minute.
-
none|no
Inherits the base time in the calendar information defined for an upper-level job group.
If calendar information is defined for none of the upper-level job groups, the system assumes 0:00.
-ld {day|none|no|{sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa}: n}
Set the base date for the calendar.
-
day
You can specify a value between 1 and 31 for the day.
-
none|no
Inherits the base date in the calendar information defined for an upper-level job group.
If calendar information is defined for none of the upper-level job groups, the system assumes the first day of the month.
-
sun|su
Sets the base date to Sunday.
-
mon|mo
Sets the base date to Monday.
-
tue|tu
Sets the base date to Tuesday.
-
wed|we
Sets the base date to Wednesday.
-
thu|th
Sets the base date to Thursday.
-
fri|fr
Sets the base date to Friday.
-
sat|sa
Sets the base date to Saturday.
-
n
Specify the week for the day; a value between 1 and 5 (specifying 1 for Sunday, for example, indicates the first Sunday of the month).
You must specify this value when specifying the day of the week, such as sun or su.
-md {this|th|next|ne|none|no}
Specify the base month for the calendar (specify the month to which a date belongs relative to the base date).
-
this|th
Sets dates following the base date to be those of the month to which the base date belongs.
-
next|ne
Sets dates following the base date to be those of the month next to the month to which the base date belongs.
-
none|no
Inherits the base month in the calendar information defined for an upper-level job group.
If calendar information is defined for none of the upper-level job groups, the system assumes the base date's month.
-c
Deletes calendar information.
If you delete calendar information, the system inherits the calendar information defined for an upper-level job group.
You cannot use this option to delete the base time, base date, and base month. To delete these settings, specify none for the corresponding option.
If you specify this option with any of the -op, -cl, -no, -of, -cf, -nf, and -df options, the system deletes calendar information before setting the open, closed, or canceled day, regardless of the sequence in which you specify the options.
-op {sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa|{year/month/{day|{sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa}[: n]}}}
Specify an open day (a day on which you will execute a jobnet).
You can specify one or more open days.
For details about the date format, see Additional information below.
-cl {sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa|{year/month/{day|{sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa}[: n]}}}
Specify a closed day (a day on which you will not execute a jobnet).
You can specify one or more closed days.
For details about the date format, see Additional information below.
-no {sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa|{year/month/{day|{sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa}[: n]}}}
Specify a canceled day (a day on which you will cancel the specification of an open or closed day).
You can specify one or more canceled days.
For details about the date format, see Additional information below.
-of open-day-information-file-name
Specify the name of the file containing the dates of open days (for details about the date format, see Additional information below).
You can specify a character string of 1 to 255 bytes.
The system adds open days to the calendar information according to the contents of this file.
-cf closed-day-information-file-name
Specify the name of the file containing the dates of closed days (for details about the date format, see Additional information below).
You can specify a character string of 1 to 255 bytes.
The system adds closed days to the calendar information according to the contents of this file.
-nf canceled-day-information-file-name
Specify the name of the file containing the dates of canceled days (for details about the date format, see Additional information below).
You can specify a character string of 1 to 255 bytes.
The system adds canceled days to the calendar information according to the contents of this file.
-df calendar-information-file-name
Specify the name of the calendar information file, in which calendar information parameters, indicating open and closed days, are defined.
For the calendar information file in this option, you can specify a file obtained by executing the following:
-
The ajsprint command with the -d option specified.
-
The ajscalutil command.
You can specify a character string of 1 to 255 bytes.
If you specify stdin as the file name, the system inputs calendar information from the standard input.
Only the parameters indicating open and closed days can be specified in a calendar information file as unit definition parameters. You cannot specify the base time, base date, or base month. For details about unit definition parameters, see 5.1 Creating a unit definition file.
-d year/month/day
Deletes the calendar information previous to the specified date (for example, specifying -d 2006/6/1 deletes the calendar information previous to June 1, 2006, including the information for June 1, 2006).
-
year
You can specify a value between 1994 and the value of the SCHEDULELIMIT environment setting parameter for the year. For details about the SCHEDULELIMIT environment setting parameter, see 20.4.2(123) SCHEDULELIMIT in the JP1/Automatic Job Management System 3 Configuration Guide.
-
month
You can specify value between 1 and 12 for the month.
-
day
You can specify a value between 1 and 31 for the day.
-R
Defines calendar information for all job groups contained in the specified job group.
job-group-name
Specify the name of the job group for which you want to define calendar information.
You can specify a character string of 1 to 930 bytes.
You can specify one or more job groups.
You cannot specify a logical host name or execution ID as a job group name.
Notes
-
Either of the following users can define calendar information:
-
A user granted the update privilege when a job group was defined or when its attributes were changed. If the job group has higher job groups, the user must have the reference privilege for all of the groups.
-
A JP1 user mapped to the OS user who has Administrators or superuser privileges
Note, however, that if yes is set after changing the ADMACLIMIT environment setting parameter from its default, even a JP1 user who was mapped to an OS user who has Administrators or superuser privileges must have the reference privilege and the update privilege.
-
-
If an open day information file, closed day information file, canceled day information file, or calendar definition file contains calendar information which does not conform to the specified format, the ajscalendar command ignores that information and continues processing. Make sure that a line feed is specified at the end of the information file. If there is no line feed, the last line will be treated as external format information and ignored. In addition, the calendar information specified on the last line will not be defined even if the ajscalendar command has been successfully executed.
-
If you simultaneously specify an open day information file, closed day information file, canceled day information file, and calendar definition file, any error encountered during the processing of one of the files causes the ajscalendar command to stop processing for the erroneous file and continue processing for other files.
Note that the ajscalendar command defines only the calendar information in successfully processed files, and then abnormally terminates.
-
If nothing is defined in the open day information file, closed day information file, canceled day information file, or calendar definition file, the system does not modify the corresponding calendar information.
-
If you modify the calendar information for a job group simultaneously with ajscalendar command and the Edit Monthly Calendar or Edit Annual Calendar window of JP1/AJS3 - View, the results will be unpredictable.
-
Always separate an option and its value by at least one space character.
-
For ajscalendar command, you cannot specify more than one option.
Correct use: ajscalendar -c -F AJSROOT1 /GROUP
Incorrect use: ajscalendar -cF AJSROOT1 /GROUP
-
If the open day information file, closed day information file, canceled day information file, or calendar definition file contains no valid calendar information, and if no valid calendar definition option is specified, ajscalendar command ends abnormally.
-
If any invalid calendar definition option is specified, the command ends abnormally.
-
Make sure that the ajscalendar command is executed when the amount of processing is small. Execution of the command might affect operation because execution of root jobnets registered in the same scheduler service as the job group for which calendar information is defined is suppressed. However, a jobnet with start conditions placed in Now monitoring status before the definition is changed is executed when the start conditions are satisfied during execution of the ajscalendar command.
-
If calendar information for the current day is changed from closed day to open day, the schedule is recalculated. As a result, the current day's execution schedule might be created for a jobnet registered for planned execution, and then jobs might be executed according to this execution schedule.
Return values
0 |
Normal end |
Multiple of 4 within the range from 4 to 124 |
Abnormal end |
Additional information
-
The schedule is recalculated if the following conditions are satisfied:
-
A scheduler service of the specified job group is running.
-
This command has terminated normally.
-
-
The following shows the formats of a standard-week value and open, closed, and canceled days, which are calendar information stored in open day information, closed day information, and canceled day information files. The three types of information files use the same format. Make sure that a line feed is specified at the end of the information file. If there is no line feed, the last line will be treated as external format information and ignored. In addition, the calendar information specified on the last line will not be defined even if the ajscalendar command has been successfully executed.
- Format of standard-week values:
-
sun|su: Specifies Sunday.
mon|mo: Specifies Monday.
tue|tu: Specifies Tuesday.
wed|we: Specifies Wednesday.
thu|th: Specifies Thursday.
fri|fr: Specifies Friday.
sat|sa: Specifies Saturday.
- Format of open, closed, and canceled days:
-
YYYY/MM/{DD{sun|su|mon|mo|tue|tu|wed|we|thu|th|fri|fr|sat|sa}[:n]}
-
YYYY
You can specify a value between 1994 and the value of the SCHEDULELIMIT environment setting parameter for the year. For details about the SCHEDULELIMIT environment setting parameter, see 20.4.2(123) SCHEDULELIMIT in the JP1/Automatic Job Management System 3 Configuration Guide.
-
MM
You can specify value between 1 and 12 for the month.
-
DD
You can specify a value between 1 and 31 for the day.
-
n
Specify the week for the day; a value between 1 and 5 (specifying 1 for Sunday, for example, indicates the first Sunday of the month).
If you specify 5 for a month which does not have the fifth week, the system invalidates the calendar information.
-
Calendar information options (-op, -cl, and -no) specified later take precedence over those specified earlier (for example, if you specify -op mon -cl mon -no mon, the system places a higher priority on -no mon, thus handling Monday as a canceled day).
-
If you specify a standard-week value and open, closed, and canceled days simultaneously, the open, closed, and canceled days take precedence (for example, if you specify -op 2010/10/25 -cl sun, the system places a higher priority on -op 2010/10/25, thus handling October 25, 2010 as an open day).
-
If you specify the day of the week for an open, closed, or canceled day, the day is converted to the corresponding date and then stored as calendar information.
-
If you do not set calendar information for a job group, JP1/AJS3 references the calendar information of the upper-level job group or the scheduler service. If calendar information is not set for the upper-level job group and the scheduler service, open days are assumed.
Example 1
The following command deletes the calendar information for job group /Sales, and then sets the closed days for October 2010 (Saturdays and Sundays). This example assumes that the closed days are defined in the closed day information file (/tmp/calendar).
ajscalendar -c -cf /tmp/calendar /Sales
- Contents of the closed day information file (/tmp/calendar)
2010/10/sat 2010/10/sun
Example 2
The following command sets the calendar information for job group /Sales. (Saturdays and Sundays are set to closed days according to the standard-week values. In October 2010, however, Saturdays are assumed to be open days.)
ajscalendar -cl su -cl sa -op 2010/10/sa /Sales