Job Management Partner 1/Automatic Job Management System 3 Command Reference 1
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.
-n
Terminates the scheduler service after all the jobnets that are running when the command is entered are terminated. (This is called jobnet restriction.)
-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.)
- #
- A running status here refers to any of the following statuses:
- Now running
- Running + Warning
- Now fault detecting
-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.
-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.
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.
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
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.