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:
-
A jobnet connector is created for a jobnet with start conditions.
-
A jobnet with start conditions is specified as the connection-destination jobnet.
-
A root jobnet that contains a job for which a jobnet connector is defined is specified as the connection-destination jobnet.
-
Start conditions are set for a unit in the planning group specified as the connection-destination jobnet.
-
A root remote jobnet is defined under the planning group specified as the connection-destination jobnet.
-
A jobnet connector is defined under the planning group specified as the connection-destination jobnet.
Execution privileges
You must have any of the following JP1 privileges:
-
JP1_AJS_Admin privilege
-
JP1_AJS_Manager privilege
-
JP1_AJS_Operator privilege
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, -k, or -h 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, -k, or -h 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, -k, or -h 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, -k, or -h 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, -k, or -h 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, -k, or -h 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, -k, or -h 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, -k, or -h option.
-h
Holds the execution of the root jobnet when the jobnet is registered for immediate execution.
You must specify this option with the -n option.
You cannot specify this option with the -s, -f, -d, -t, -p, -g, -o, -b, or -e option.
You cannot use this option in an environment where the JP1/AJS3 database uses the compatible ISAM configuration.
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
-
Either of the following users can register fixed execution of a jobnet:
-
A user granted the operation privilege when all the units in the jobnet to be registered for execution were defined or when their attributes were changed
-
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 operation privilege.
-
-
This command terminates abnormally if the scheduler service is not running.
-
To register a jobnet for execution, be sure to use the same procedure as for registering the next execution schedule of the jobnet. If the next schedule of a jobnet has already been registered for planned execution, you cannot register this jobnet for planned execution. In these cases, the command terminates abnormally.
-
You cannot register a jobnet for planned execution if the jobnet is scheduled to run next. The command terminates abnormally.
-
A jobnet registered for immediate execution is not scheduled to be executed again, so the jobnet can be re-registered for immediate execution even if the jobnet has already been registered for immediate execution.
-
If a jobnet you are going to register for execution is suspended, the command terminates abnormally.
-
With the -w option specified, the ajsentry command can execute up to 50 jobnets concurrently. If you attempt to execute more than 50 jobnets, the ajsentry command terminates abnormally without registering the jobnets for execution.
-
For the root jobnet under the planning group, only fixed execution registration specified by the -p option, or the -b and -e options can be performed. If you execute the command in any other way, it ends abnormally.
-
If you specify the -w option to terminate the ajsentry command after the jobnet is executed, you cannot obtain the result of jobnet execution in the return value of the ajsentry command. You must separately execute the ajsshow command to obtain the result of jobnet execution.
-
If you specify none of the -n, -f, -d, -t, -p, and -g options, the -s option is assumed.
-
This note applies to root jobnets whose execution order is controlled by using jobnet connectors. Even though there are no jobnet generations for which a connection relation is established between a root jobnet for which a jobnet connector is defined and the connection-destination jobnet, the jobnet is registered for execution.
-
If you register a release-target jobnet (a root jobnet registered for release) for immediate execution, the jobnet is executed immediately with the jobnet definition that was applied.
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.
-
Registration for fixed execution at a specific time (20:00 on July 1, 2010)
ajsentry -d 2010/07/01 -t 20 /net1
-
Registration for fixed execution in a specific time period (based on the execution schedule specified in the schedule information file)
ajsentry -p schedule-information-file-name /net1