The jobagent.sh
(or jobagent.bat
on
Windows) is a command-line utility for controlling the job agent.
The syntax is:
./jobagent.sh [options] command
The options are optional, but a command
must always be given. The script is located in the
<base-dir>/bin
directory and you must
change to that directory to be able to use the script.
-c
The path to the configuration file to use, for example:
./jobagent.sh -c other.config start
The default value is jobagent.properties
.
The classpath is not searched which means that it doesn't find
the configuration file in <base-dir>/www/WEB-INF/classes/
unless you specify the path to it.
See Appendix G, jobagent.properties reference
for more information about job agent configuration files.
register
Register the job agent with the BASE server. If the job agent already exists this command does nothing.
unregister
Unregister/delete the job agent from the BASE server. If the job agent does not exist this command does nothing.
start
Start the job agent. As soon as it is up and running it will check the database for jobs that are waiting to be executed.
pause
Pause the job agent. The job agent will continue running but
does not check the database for jobs. To start it again use the
start
command.
stop
Stop the job agent. To start it again use the start
command.
info
Get information about the job agent. This will output a string
in the form:
Status can be either
Status:Running
Job:1
Job:5
Running
or Paused
. For each job that is currently
running, the ID is given. In the future, the info
command may output more information. For example, there is already
infrastructure code for CPU and memory usage. The only problem is
that the information is not easy to get for a Java program.
status
Similar to the info
command but with less output.
The output is either Running, Pauses or Stopped
.
In case of an unexpected error, an error message may be displayed instead.
help
Display usage information.