Hitachi

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


ajsentry

Organization of this page

Format

ajsentry
     [-F service-name]
     [{-s|-n|-f|-d[[year/]month/]day -t hours[:minutes]|
          -p schedule-information-file-name}][-g number-of-scheduled-
          future-generations]
     [-o]
     [-w]
     [-c macro-variable-specification]
     [-R]
     [-L]
     [-T]
     [-m {hours:minutes|M-minutes|unlimited} -k {number-of-
          times|unlimited}]
     [-b [[year/]month/]day -e [[year/]month/]day]
     [-h]
     jobnet-name-or-job-group-name...

Description

Registers a defined jobnet for execution. The ajsentry command also checks whether the unit specified during registration for execution satisfies any of the following conditions, and if any are satisfied, an error is returned:

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.

-s

Executes a jobnet according to the schedule defined for it (registers a jobnet for planned execution).

Unlike the -f option, this option causes the system to execute a jobnet which is scheduled to execute on the day even if you execute the command after the scheduled time for executing the jobnet has passed.

You cannot specify this option with the -n, -f, -d, -t, -p, -g, -w, -m, or -k option.

-n

Executes a jobnet immediately, ignoring any schedule defined for the jobnet (registers a jobnet for immediate execution). Note that the start conditions will be valid only when they are specified with the -m or -k option.

You cannot specify this option with the -s, -f, -d, -t, -p, -g, or -o option.

-f

Executes a jobnet according to the next schedule after the registration of execution (registers a jobnet for planned execution).

Unlike the -s option, this option does not cause the system to execute a jobnet which is scheduled to execute on the day if you execute the command after the scheduled time for executing the jobnet has passed.

You cannot specify this option with the -s, -n, -d, -t, -p, -g, -w, -m, or -k option.

-d [[year/]month/]day

Executes the jobnet at the specified date, irrespective of the schedule defined in the jobnet (the jobnet is determined, executed, and registered). Jobnets with start conditions are immediately executed without monitoring the start conditions.

Specify this option together with the -t option.

You cannot specify this option with the -s, -n, -f, -p, -g, -w, -m, or -k option.

  • year

    You can specify a value between 1994 and 2036 for the year.

  • month

    You can specify a value between 1 (or 01) and 12.

  • day

    You can specify a value between 1 (or 01) and 31.

If you omit the specification of the year or both the year and month for this option, the system assumes the following values:

year: The year in which you executed the command

year/month: The year and month in which you executed the command

-t hours[:minutes]

Executes the jobnet at the specified time, irrespective of the schedule defined in the jobnet (the jobnet is determined, executed, and registered). Jobnets with start conditions are immediately executed without monitoring the start conditions.

Specify this option together with the -d option.

You cannot specify this option with the -s, -n, -f, -p, -g, -w, -m, or -k option.

  • hours

    You can specify a value between 0 (or 00) and 47 hours.

  • minutes

    You can specify a value between 0 (or 00) and 59 minutes. If you omit this option, the system assumes 0.

-p schedule-information-file-name

Specify the name of the schedule information file in which you have defined execution schedule for the jobnet (so that the jobnet is registered for fixed execution). you can use the ajsschedule command to create a schedule information file.

You can specify a character string of 1 to 255 bytes. The file name should use the full path name.

You cannot specify this option with the -s, -n, -f, -d, -t, -w, -m, or -k option.

When you specify the -p option, specify for the jobnet name only the root jobnet name that is specified when a schedule information file is created. This command ends abnormally when this option is specified together with the wildcard characters or the -R option, and the root jobnet name in the schedule information file does not match the specified root jobnet name.

-g number-of-scheduled-future-generations

Specify the number of subsequent generations you want to execute according to the fixed schedule.

You can specify a number between 1 and 99 (logs).

You cannot specify this option with the -s, -n, -f, -d, -t, -w, -m, or -k option.

-o

Does not execute a jobnet which is scheduled to execute on the day when you start the scheduler service, if its scheduled time for starting execution is prior to the time when you start the scheduler service.

You cannot specify this option with the -w, -m, -k, -n, or -h option. This option is valid if the service startup mode is set to a warm start or a disaster recovery start.

-w

Terminates the command upon the completion of executing the jobnet, if it is registered for immediate execution.

You can specify this option when registering the root jobnet for immediate execution.

Even if this option is specified, the command will terminate without waiting for the end of the jobnet in the following cases:

  • The scheduler service stops during jobnet execution.

  • The generation with a termination wait specified is left unexecuted using a carryover method.

  • The generation with a termination wait specified is deleted. (For example, the generation that is unregistered for execution or registered for immediate execution or fixed execution discontinues its execution.)

  • The generation with a termination wait specified is left unplanned.

You must specify this option with the -n option. You cannot specify this option with the -m or -k option.

-c macro-variable-specification

Specify the information that is to be set in the macro variable used by the jobs placed under the root jobnet. At the time of job execution, this is expanded into the passing information in the specified macro variable.

You can set up to 32 items in the form of -c macro-variable-name:passing-information. If you specify more than one of the same macro variable name, the passing information in only the first one is effective. For multiple items, you can specify a string of a maximum of 4,085 bytes (including the value of the macro variable name + the passing information + 4).

  • macro-variable-name

    Specify this name in AJS2xxxxx form, in which xxxxx is any character string. There is no need to prefix or suffix it with a question mark (?). You can use upper-case alphabetic characters, numeric characters, and periods (.).

    You can specify a string of up to 62 bytes, which is calculated by subtracting 2 (two question marks at both ends) from 64.

  • passing-information

    Specify any character string.

    You can specify a string of 1 to 255 bytes.

-R

Registers all units contained in the specified job group for execution.

If you specify this option with the -L and/or -T options, the system registers the jobnets for execution according to the specification of each option.

If you do not specify the -T option together with the -R option, all the units are registered for execution, and the execution registration processing for the units except the root jobnet ends abnormally.

-L

Registers jobnets which have not been registered for execution.

-T

Registers root jobnets.

-m {hours:minutes|M-minutes|unlimited}

Specify the time the system will wait for the start condition to be satisfied.

You must specify this option with the -n and -k options. You cannot specify this option with the -w option.

  • hour:minutes

    Specify an absolute time.

    You can specify a value between 0 (or 00) and 47 for the hour.

    You can specify a value between 0 (or 00) and 59 for the minute.

  • M-minutes

    Specify a time relative to the scheduled start time for the jobnet.

    You can specify a value between 1 (or 01) and 2,879 minutes.

  • unlimited

    Waits for an unlimited time of period until the condition is satisfied.

-k {number-of-times|unlimited}

Specify the number of times the system will wait for the start condition to be satisfied.

You must specify this option with the -n and -m options. You cannot specify this option with the -w option.

  • number-of-times

    You can specify a value between 1 and 999 (times).

  • unlimited

    Sets an unlimited number of times for waiting.

-b [[year/]month/]day

Specify the start date of the period for executing a jobnet according to the schedule defined for the jobnet (fixed execution registration of the jobnet performed). The specified start date complies with the base time.

  • year

    You can specify a value between 1994 and 2036 for the year.

  • month

    You can specify a value between 1 (or 01) and 12.

  • day

    You can specify a value between 1 (or 01) and 31.

If you omit the specification of the year or both the year and month for this option, the system assumes the following values:

year: The year in which you executed the command

year/month: The year and month in which you executed the command

You must specify this option with the -e option.

You cannot specify this option with the -s, -n, -f, -d, -t, -p, -w, -m, or -k option.

-e [[year/]month/]day

Specify the end date of the period for executing a jobnet according to the schedule defined for the jobnet (fixed execution registration of the jobnet performed). The specified end date complies with the base time.

  • year

    You can specify a value between 1994 and 2036 for the year.

  • month

    You can specify a value between 1 (or 01) and 12.

  • day

    You can specify a value between 1 (or 01) and 31.

If you omit the specification of the year or both the year and month for this option, the system assumes the following values:

year: The year in which you executed the command

year/month: The year and month in which you executed the command

You must specify this option with the -b option.

You cannot specify this option with the -s, -n, -f, -d, -t, -p, -w, -m, or -k option.

-h

Holds the execution of the root jobnet when the jobnet is registered for execution.

The hold attribute is set in the first execution generation of those generations created when the jobnet is registered for execution.

If you specify the schedule information file name in the -p option to register a jobnet for execution, the hold attribute is set in the first created generation. Therefore, you must note that if schedule information entries are not arranged in date order while the schedule information file is being edited, the hold attribute might be set for unintended generations.

jobnet-name or job-group-name

Specify the name of the jobnet you want to register for execution. You can also specify a jobnet name or job group name with the -R, -L, or -T option.

You can specify a character string of 1 to 930 bytes.

You can specify more than one jobnet name or job group name. If you want to specify a jobnet name, however, you can specify only a root jobnet name. You cannot specify a manager job group name or manager jobnet name.

You can specify a logical host as a jobnet or job group name. You cannot specify an execution ID.

Notes

Return values

0

Normal end

1 to 3 or multiple of 4 within the range from 4 to 124

Abnormal end

Example1

The following command registers jobnet net1 for planned execution (executes the jobnet according to the schedule defined for it).

ajsentry -s net1

Example2

In this example, the command sets a macro variable (AJS2ENV) and a value (/tmp/unit_data) in a jobnet (net1), and registers the jobnet for immediate execution.

ajsentry -n -c AJS2ENV:/tmp/unit_data net1

Example 3

In this example, the command registers jobnet net1 for fixed execution.