[Home] [Index] [Previous] [Next]

Beyond The GUI

Using Oddjob without Oddjob Explorer.

The Command Line

Oddjob can be run from the command line using the following command:

java -jar run-oddjob.jar

For further options use:

java -jar run-oddjob.jar -h

Additional arguments are passed into Oddjob and are set as the args property of the top Oddjob. If the command line is

java -jar run-oddjob -f greeting.xml "Hello World!"

and greeting.xml contained:

<oddjob id="this">
 <job>
  <echo>${this.args[0]}</echo>
 </job>
</oddjob>

Then the result would be:

Hello World!

Stopping Oddjob

Oddjob has a shutdown hook that attempts to stop Oddjob cleanly when the virtual machine detects it is being asked to terminate. Usually this happens with Ctr-C or the kill signal, but the exact implementation is machine dependent.

If a job is hanging and refuses stop Oddjob will forcibly exit after 5 seconds.

In the Linux Background

Oddjob comes with a server.xml that will start a server for use on a remote machine.

The following command will run Oddjob as a Linux background process.

nohup java -jar run-oddjob.jar -f server.xml &

Opening the corresponding client.xml file from Oddjob Explorer will allow jobs to be deployed to the server from the desktop using drag and drop or by changing the configuration directly on the server using Designer.

As a Windows Service

Oddjob can be run as a service with JavaService. This is an example posted on the Oddjob forum of an install command:

JavaService -install SchedulerService "%JAVA_HOME%\bin\server\jvm.dll" -Djava.class.path=C:\PDI\Oddjob\run-oddjob.jar 
-Doddjob.executors.default.poolsize=120 -start org.oddjob.launch.Launcher -params -f "%CD%\..\Oddjob\server.xml" 
-description "Pentaho Oddjob Scheduler Service" 

Note that the double quotes are required to use the environment variables.

Another option would be Java Service Wrapper.

When Things Go Wrong

By default Oddjob writes to a log file called oddjob.log which will be in the same directory that Oddjob was started from.

The logging configuration is in the log4j.properties file located in oddjob_dir/opt/class. Changing the logging level to debug may provide additional information.


[Home] [Index] [Previous] [Next]