Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


24.4.1 Adding a scheduler service

This subsection describes the procedure for adding a scheduler service.

Organization of this subsection

(1) On a Windows host

  1. Prepare the external database.

    For details about the preparations for using an external database, see 24.1 Preparations for using an external database.

    Note that each scheduler service requires an instance of the database. When you add a scheduler service, you must also create an additional instance of the database.

    Make sure that the database is already running.

  2. In Windows Control Panel, open the Services administrative tool, and stop the following service:

    • JP1/AJS3 service

  3. Use Explorer or another means to create the following folders:

    • Database folder

    • Folder for temporary files

    • Job information folder

    • Backup information folder

    Make sure that the above folders, other than the backup information folder, are neither folders used by other scheduler services set on the local hosts (the physical host and all logical hosts) nor subfolders of those folders.

  4. Run the jajs_setup command to add a scheduler service.

    Execute the following command:

    jajs_setup
    -a
    -k SQLSVR
    -F scheduler-service-name
    -n scheduler-service-identification-number
    -p service-for-the-port-reporting-the-job-status
    -d database-directory-name
    -t temporary-directory-name
    -j job-information-directory-name
    -b backup-information-directory-name
    -of ODBC-file-data-source-name
    -od database-name
    [-E {byte | sjis}]

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  5. Specify the environment setting parameter STDFILEOUTDIR.

    In an environment that uses an external database, the directory to which standard output files and standard error output files are to be output by the ajsshow command must be specified by using the environment setting parameter STDFILEOUTDIR.

    Execute the following command:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\scheduler-service-name]" "STDFILEOUTDIR"="directory-of-your-choice"

    With respect to the directory-of-your-choice, specify a directory that is not being used by an existing scheduler service.

    Note that the files output to the specified directory will not be automatically deleted. Periodically delete the files manually as necessary.

    For details about the ajsshow command, see ajsshow in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

    For details about the environment setting parameter STDFILEOUTDIR, see 20.4.2(125) STDFILEOUTDIR.

  6. Open the following file with a text editor such as Notepad:

    system-folder\system32\drivers\etc\Services

  7. For the service name of the port that reports the job status specified in step 4, set the port number.

    Example of setting 20248 as the port number:

       jp1ajs2report2   20248/tcp
    Important

    Make sure that the port number you specify does not duplicate any existing port number. To use JP1/AJS3 in an environment with a Windows Firewall, register the port number you specified (in the above example, service name jp1ajs2report2 and port number 20248) in the Windows Firewall rules so that data will be able to pass through the firewall.

  8. Restart the JP1/AJS3 service.

    The scheduler service is added and started with the specified settings.

    After the JP1/AJS3 service has been restarted, use JP1/AJS3 - View to confirm that the manager job group is displayed with the name of the added scheduler service attached.

Supplementary note on command execution:

When the scheduler service is adding, if you execute a command without specifying a scheduler service name in the -F option, the default scheduler service is assumed.

You can omit the -F option when the name of a scheduler service name is specified in the AJSCONF environment variable.

(2) On a Linux host

  1. Prepare the external database.

    For details about the preparations for using the external database, see 24.1 Preparations for using an external database.

    Note that each scheduler service requires an instance of the database. When you add a scheduler service, you must also create an additional instance of the database.

    Make sure that the corresponding instance of the database is already running.

  2. Stop the JP1/AJS3 service.

    Execute the following commands to confirm that all processes have stopped:

    # /etc/opt/jp1ajs2/jajs_stop
    # /opt/jp1ajs2/bin/jajs_spmd_status
  3. Use the mkdir command or another means to create the following directories:

    • Database directory

    • Directory for temporary files

    • Job information directory

    • Backup information directory

    Make sure that the above directories, other than the backup information directory, are neither directories used by other scheduler services set on the local hosts (the physical host and all logical hosts) nor subdirectories of those directories.

  4. Run the jajs_setup command to add a scheduler service.

    Execute the following command:

    jajs_setup
    -a
    -k SQLSVR
    -F scheduler-service-name
    -n scheduler-service-identification-number
    -p service-for-the-port-reporting-the-job-status
    -d database-directory-name
    -t temporary-directory-name
    -j job-information-directory-name
    -b backup-information-directory-name
    -of ODBC-file-data-source-name
    -od database-name
    [-E {byte | sjis}]

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  5. Specify the environment setting parameter STDFILEOUTDIR.

    In an environment that uses an external database, the directory to which standard output files and standard error output files are to be output by the ajsshow command must be specified by using the environment setting parameter STDFILEOUTDIR.

    Execute the following command:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\scheduler-service-name]" "STDFILEOUTDIR"="directory-of-your-choice"

    With respect to the directory-of-your-choice, specify a directory that is not being used by an existing scheduler service.

    Note that the files output to the specified directory will not be automatically deleted. Periodically delete the files manually as necessary.

    For details about the ajsshow command, see ajsshow in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

    For details about the environment setting parameter STDFILEOUTDIR, see 20.4.2(125) STDFILEOUTDIR.

  6. For the service name of the port that reports the job status specified in step 4, set the port number.

    Open the /etc/services file with a text editor, and add the port number. Make sure that you do not specify an existing port number.

    Example of setting 20248 as the port number:

       jp1ajs2report2   20248/tcp
  7. Restart the JP1/AJS3 service.

    The scheduler service is added and started with the specified settings.

    After the JP1/AJS3 service has been restarted, use JP1/AJS3 - View to confirm that the manager job group is displayed with the name of the added scheduler service attached.

Supplementary note on command execution:

When the scheduler service is adding, if you execute a command without specifying a scheduler service name in the -F option, the default scheduler service is assumed.

You can omit the -F option when the name of a scheduler service name is specified in the AJSCONF environment variable.