ajsstop
- Organization of this page
Format
ajsstop [-F service-name] [-s|-n|-j|-k|-c|-r] [-f] [-w]
Description
Terminates the JP1/AJS3 scheduler service.
You must terminate the scheduler service in the following cases:
-
When terminating scheduler service operation as planned
-
When restoring a database
-
When modifying any environment setting parameter
This command also cancels any schedule restriction or jobnet restriction, previously requested by this command, to return the operation to the original status.
Execution privileges
In Windows: Administrators privilege
In UNIX: Superuser privilege
Arguments
-F service-name
Specify the name of the target scheduler service.
You can specify a character string of 1 to 30 bytes.
If you omit this option, the system assumes the default scheduler service name.
-s
Terminates the scheduler service after all jobnets that are scheduled to execute on the day on which the command is executed are terminated (this is called schedule restriction).
The following examples show the termination of a scheduler service when a jobnet registered for execution belongs to a job group in which a base time has been set. In the examples, jobnets to be executed are marked "E" while those not to be executed are marked with "N".
- Example 1:
-
- Job group A:
-
Base time: 9:00
Scheduler service started at 9:00
Jobnet to be executed at 12:00 and 7:00
Command entered at 10:00
- Example 2:
-
- Job group A:
-
Base time: 10:00
Scheduler service started at 10:00
Jobnet to be executed at 12:00 and 7:00
Command entered at 9:00
- Example 3:
-
- Job group A:
-
Base time: 9:00
Scheduler service started at 9:00
Jobnet to be executed at 12:00 and 7:00
- Job group B:
-
Base time: 11:00
Scheduler service started at 11:00
Jobnet to be executed at 13:00 and 9:00
Command entered at 10:00
- Example 4:
-
- Job group A:
-
Base time: 9:00
Scheduler service started at 9:00
Jobnet to be executed at 12:00 and 7:00
- Job group B:
-
Base time: 10:00
Scheduler service started at 10:00
Jobnet to be executed at 13:00 and 8:00
Command entered at 11:00
If the scheduled date of jobnet execution is shifted to the date on which the command is entered, the system handles the jobnet as a jobnet executed on the date on which the command is entered.
Monitored generations of a jobnet with a start condition that are in Now monitoring status enter Interrupted monitoring status after all jobnets scheduled for execution on the day on which the command is executed have terminated. If the wait condition of a monitored jobnet that is subject to schedule restriction is met while the generation is still in Now monitoring status, the jobnet is executed.
-n
Terminates the scheduler service after all the jobnets that are running when the command is entered are terminated. (This is called jobnet restriction.)
A jobnet that is subject to schedule restriction will not start executing when:
-
The start time is reached
-
The previous generation ends when the jobnet is in Wait for prev. to end status
-
The start condition of a unit with a start condition is satisfied#
- #
-
Execution generations generated when a start condition is met during schedule restriction are executed after you use this command with the -r option to cancel the schedule restriction, or you restart the scheduler service.
Monitored generations of a jobnet with start conditions that are in Now monitoring status enter Interrupted monitoring status after all jobnets running when the command is executed have ended.
-j
Terminates the scheduler service after all the jobs that are running and jobnet connectors that are in a running status# when the command is entered are terminated. (This is called job restriction.) The effect on running root jobnets is the same as if you interrupted the root jobnet.
- #
-
A running status here refers to any of the following statuses:
-
Now running
-
Running + Warning
-
Now fault detecting
-
A jobnet that is subject to schedule restriction will not start executing when:
-
The start time is reached
-
The previous generation ends when the jobnet is in Wait for prev. to end status
-
The start condition of a jobnet with a start condition is satisfied#
- #
-
Execution generations generated when a start condition is met during job restriction are executed after you restart the scheduler service.
Monitored generations of a jobnet with start conditions that are in Now monitoring status enter Interrupted monitoring status immediately when the command is entered.
-k
Terminates the scheduler service immediately when the command is entered. This option causes the system to kill all the jobs that are running when the scheduler service is terminated. (This process is called forced termination (kill) of jobs.) The effect on running root jobnets is the same as if you killed the root jobnet.
A jobnet that is subject to forced job termination will not start executing when:
-
The start time is reached
-
The previous generation ends when the jobnet is in Wait for prev. to end status
-
The start condition of a jobnet with a start condition is satisfied#
- #
-
Execution generations generated when a start condition is met for a job killed by forced job termination are executed after you restart the scheduler service.
Generations of a jobnet with start conditions that are in Now monitoring status enter Interrupted monitoring status immediately when the command is entered.
-c
Terminates the scheduler service immediately when the command is entered. This option, however, allows the system to continue all the jobs that are running when the service is terminated. (This process is called forced termination (kill) of the scheduler service.)
You can specify this option to kill all processes quickly, preventing the scheduler service process from being killed, when you want to stop the system in emergency.
-r
Cancels any schedule restriction (-s option) or jobnet restriction (-n option) applied, to return the operation to the original status.
-f
Accepts a request to stop the scheduler service even in the following status, in which no normal stop request can be accepted:
-
Start processing of the scheduler service requested to start is in progress
You cannot specify this option together with the -s, -n, -j, or -r option.
You must specify this option together with the -c or -k option.
If you execute the command without specifying the -f option before the scheduler service requested to start becomes up and running, an error occurs.
-w
Specify this option to terminate the command when the scheduler service completely stops. If you specify this option together with the -r option, the command terminates when the schedule restriction or the jobnet restriction is completely canceled.
Notes
-
This command terminates abnormally if you execute it when a scheduler service is not running.
-
You cannot cancel a job restriction (you can cancel schedule and jobnet restrictions using the -r option).
-
The system performs restriction processing before starting termination processing for the scheduler service. You cannot cancel restrictions after the system starts termination processing. You can view the current status using the ajsstatus command.
-
To insure the stop of the scheduler service, specify the -w option. (If you omit the -w option, the ajsstop command terminates immediately after issuing a stop request to the scheduler service. The execution of the next command may, therefore, start before the processing for stopping the scheduler service is completed.)
-
If a jobnet connector is used to control the execution order of jobnets, then, depending on the status of the connection-destination jobnet, the jobnet connector might be placed in a running status.# If the jobnet connector is placed in a running status, the root jobnet that includes the jobnet connector is also placed in a running status. In this case, you cannot restrict how the scheduler service stops. If this situation occurs, stop the scheduler service by specifying the -k or -c option, or by changing the status of the jobnet connector.
# A running status here refers to any of the following statuses:
-
Now running
-
Running + Warning
-
Now fault detecting
-
-
This note applies when a jobnet connector is used to control the execution order of root jobnets. When the -j option is specified, if the connection-destination root jobnet contains a unit that is waiting for the preceding unit to end, the status of the root jobnet that contains the jobnet connector does not change from Now running. In this case, you cannot stop the scheduler service. If this situation occurs, stop the scheduler service by specifying the -k or -c option.
-
You cannot rerun a job or jobnet that is subject to job restriction or forced job termination.
-
You cannot perform automatic retry on abnormal end for a job that is subject to job restriction or forced job termination. The job enters an end status without retry execution regardless of the return code or the number of retry executions.
-
If you perform forced job termination while a large number of remote jobnets are running, a lack of desktop heap resources might cause termination of the remote jobnets to fail and prevent the scheduler service from stopping. When there is a large number of active remote jobnets, terminate the remote jobnets before you perform forced job termination.
-
The system cannot terminate a suspended root jobnet. To stop the scheduler service, you must release any suspended root jobnets before executing the command.
-
You cannot execute this command together with any of the following commands on the same logical host:
ajsprofalter command
ajsembdbstart command
ajsembdbstop command
ajsstart command
ajsstop command
jajs_hstd command
jajs_hstd_stop command
jajs_spmd command
jajs_spmd_status command
jajs_spmd_stop command
jajs_start command (UNIX only)
jajs_start.cluster command (UNIX only)
jajs_stop command (UNIX only)
jajs_stop.cluster command (UNIX only)
Return values
0 |
Normal end |
Multiple of 4 within the range from 4 to 124 |
Abnormal end |
Example
The following command terminates the scheduler service after the currently running service is terminated:
ajsstop -n