Job handling procedure
This procedure results in a job that runs without user interaction according to one of these specifications:
- The job calendar.
- The interval that is defined in the job’s basic data.
- The scheduling lines.
This helps you to use LN ’s resources more efficiently.
Steps in the job management procedures
Depending on the job’s status, these methods are available to start a job:
- If the job status is In Queue, the Job Scheduler BSE Service, or
the Job Daemon, starts the job.
If you use the Job Scheduler BSE Service, the job starts automatically and a running bshell is not required. The Job Scheduler BSE Service starts a bshell in the background, which starts the job with the Activate Job (ttaad5203m000) session.
You must start the Job Scheduler BSE Service to ensure that the Job Scheduler BSE Service can start any job. If the Job Scheduler BSE Service runs, you can exit the bshell without any problem. The Job Scheduler BSE Service, and not your bshell, carries out the job.
- If the job’s status is Free, you can start the job manually with
these options:
- The Activate Job (ttaad5203m000) session
- The UNIX shell program
rc.startjob
- The Windows batch file
startjob.bat
In this case, you must have a running bshell.
To enable and start the Job Daemon on a Windows platform
The Application Services Manager (ASM) manages (externally) the Job Daemon service.
Typically, a Job Daemon runs jobs for one company. To run jobs for more
companies, you must create a Job Daemon entry, in ASM, for each company. Per entry, use
the BSE_COMPNR
variable to specify the company for which a Job
Daemon must be started. Use the PACKAGE_COMB
variable to specify the
package combination to which that company is linked.
To start the Job Daemon on a UNIX platform
To start the Job Daemon, you can include the
${BSE}/etc/rc.startjobdm
command in the
${BSE}/etc/rc.start
file. Therefore, the Job Daemon starts when you
start the LN environment.
Typically, a Job Daemon runs jobs for one company. To run jobs for
multiple companies, you must change the rc.start
file to start Job
Daemons for each company. Per Job Daemon entry, use the BSE_COMPNR
variables to specify the company for which a Job Daemon must be started. Use the
PACKAGE_COMB
variable to specify the package combination to which
that company is linked.
Stop the Job Daemon
To stop the Job Daemon you can include the
${BSE}/etc/rc.stopjobdm
command in the
${BSE}/etc/rc.stop
script. Therefore, the Job Daemon stops when you stop the
LN environment. To stop jobs for multiple
companies, you must include multiple entries of rc.stopjobdm
in the
rc.stop
file. Use the BSE_COMPNR
variable to
specify the company for which a Job Daemon must be stopped. Use the
PACKAGE_COMB
variable to specify the package combination to which that
company is linked.
To run a job with the Job Daemon
To use the Job Daemon to start a job, you must ensure that the job’s status is In Queue.
See the session.
To run the job with Activate Job (ttaad5203m000)
Because your running bshell starts the job, you cannot close the bshell until the job is finished. If the job is started before the time and date of execution, the job’s status changes to Waiting. When the job is carried out, the job’s status changes to Running.
You can start a job that belongs to more than one company. Switch to the required company with the
command, before you start the job.To run the job with the rc.startjob shell program
You can also start the job with the UNIX shell program ${BSE}/etc/rc.startjob.
To start the job, at the UNIX prompt run this command::
${BSE}/etc/rc.startjob [job name]
Scheduling
If the rc.startjob
program is included in a UNIX
crontab, the program can automatically start jobs. For this purpose, some UNIX variables
must be defined in the shell script. Additional information about how to define the UNIX
variables is included in the shell script of the rc.startjob
.
Run jobs for multiple companies
If you must start jobs that pertain to different company numbers,
different versions of the rc.startjob
script are created.
To run the job with the startjob.bat batch file
On a Windows platform you can start jobs with the
startjob.bat
batch file.
To start a job:
- Start a Command Prompt (cmd) on your LN server.
- Go to this folder ${BSE}\bin.
- Run the
fillenv.bat
batch file to set the LN environment variables. - Type
startjob.bat [job name]
to start the job.
Scheduling
To automate the execution of jobs, you can include startjob.bat in an
external job scheduler, for example, the Windows scheduler. For this purpose, you must
set the LN environment variables in the
startjob.bat
batch file. To achieve this, you can copy the settings in the
fillenv.bat
batch file to the startjob.bat
file.
Run jobs for multiple companies
If you must start jobs that pertain to different company numbers,
different versions of startjob.bat
are created.