7.3 Notes on using PC jobs
This section gives notes on using PC jobs.
Read this section in conjunction with 2.6.2 Troubleshooting problems related to standard jobs, HTTP connection jobs, action jobs, and custom jobs in the manual JP1/Automatic Job Management System 3 Troubleshooting, which provides information about what might cause a PC job to fail to start or end abnormally, and cautionary notes about using PC jobs.
-
Avoiding a system resource shortage (in Windows)
When the agent host is a Windows host, if you execute more than a specific number of jobs concurrently, you might encounter a shortage of a system resource (desktop heap) and an error might occur depending on the system environment. In this case, consider taking the following action:
-
Stop sharing the desktop heap with other applications
Change the JP1/AJS3 service account to a user account. By setting the JP1/AJS3 service account to a user account that differs from the accounts of other services and the user account of the logon user, you can use the system without sharing the desktop heap.
-
Decrease usage of the desktop heap
You can decrease consumption of the desktop heap by setting the account of the OS user frequently used for job execution to the same account as the JP1/AJS3 service account.
-
-
Using space characters in an application file name (in Windows)
When the agent host is a Windows host, if an application file name with an extension associated with a file type contains a space character, check whether the file type is registered correctly in Windows in the File Types page in Explorer, and enclose the application file name with double quotation marks (").
-
Preventing jobs from entering Failed-to-start status (in Windows)
When the agent host is a Windows host, and a job enters Failed to start status, make sure that the user who started the JP1/AJS3 service has the permissions listed below. When using queueless jobs, make sure that the following permissions have been set for the account of the queueless agent service:
-
For the executable file of the job: Read and execute permissions
-
For the environment variable file for the job: Read permission
-
For the standard input file for the job: Read permission
-
For the standard output file for the job: Read and write permissions
-
For the standard error output file for the job: Read and write permissions
-
For the transfer source file for the job: Read permission
-
-
Do not include a command that shuts down the OS in a PC job
Do not execute a PC job that includes a command for shutting down the operating system of the host itself or the agent host. Because Windows does not wait for JP1/AJS3 to stop before it shuts down, there might be damage to the JP1/AJS3 data files if Windows shuts down while JP1/AJS3 is running. If you want to shut down the OS from a job, use a Local Power Control job in conjunction with the JP1/Power Monitor.
To shut down the system manually, use the power control command (aompwcon command) of JP1/Power Monitor. If you want to shut down the system manually but do not have JP1/Power Monitor installed, stop the JP1/AJS3 service manually before shutting down the OS.
-
Executing the jajs_dbbackup command from a PC job with the backup enhancement function enabled
If you execute the jajs_dbbackup command by specifying an embedded database with a PC job defined, the status of the PC might not change from the following statuses even if the job has been executed. In this case, however, the PC job status will change normally after the jajs_dbbackup command terminates.
-
Waiting to execute
-
Now queuing
To avoid such situations, make sure that the PC job that executes the jajs_dbbackup command is defined in the scheduler service that runs on an embedded database that is not to be backed up.
For an overview of the backup enhancement function, see 5.2.5 Backing up and recovering an embedded database by using the backup enhancement function in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.
-
-
Use file names of 254 bytes or less in jobs (in Windows)
A job might enter Failed to start or Ended abnormally status if any of the following file names specified in the job is 255 bytes or longer:
-
The executable file of the job
-
The environment variable file for the job
-
The standard input file for the job
-
The standard output file for the job
-
The standard error output file for the job
-
The end judgment file for the job
-
The transfer source file for the job
-
The transfer destination file for the job
This problem also applies to queueless jobs. Make sure that the above file names have no more than 254 characters.
-
-
When the executable file name specifies a command or program incompatible with data input from a standard input file
To execute a job for which a command or program incompatible with data input from a standard input file is specified in the File name field of the Define Details dialog box, you specify CON in the Standard input, Standard output, and Standard error fields. In this case, JP1/AJS3 will not read data from standard input or acquire any data output to standard output and standard error output, and the job's execution results do not appear in the Execution Result Details dialog box of JP1/AJS3 - View. The timeout command is one example of a command that does not support data input from the standard input file.
-
Put the shortcut files for necessary programs into the Startup folder of Windows
When you put the shortcut files for necessary programs into the Startup folder of Windows, put it in the following folder.
%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\StartUp
The default location of %ALLUSERSPROFILE% is system-drive\ProgramData.