Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


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:

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 2036 for the year.

  • 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

Return values

0

Normal end

Multiple of 4 within the range from 4 to 124

Abnormal end

Additional information

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