Oddjob

from rgordon.co.uk

Examples

To run the examples from Oddjob Explorer double click run-oddjob.jar.

This should launch Oddjob Explorer. Select File -> Open from the menu and choose oddjob.xml in the examples directory. All the examples are presented in a folder and can be run individually from the Job menu (or select and right-click).

Alternatively to run the examples from the command line:

java -jar run-oddjob.jar
		

Examples can also be run individually from the oddjob.xml file in each directory, such as:

java -jar run-oddjob.jar -f examples/simple/oddjob.xml
		

simple - Hello World

Echo "Hello World". The simplest example of using Oddjob.

files:

exec - Execute a batch file

This example demonstrates executing a batch file from Oddjob and introduces us to using sequences of jobs and variables.

exec.xml is the configuration for executing the batch file. It contains a sequence of two jobs. The first sets a variable, the second executes the batch file with the variable value passed in as an argument.

files:

workflow - Decisions

An 'if' job uses the return state of one job to decide which of a number of alternate job branches to execute.

This job uses a random task to simulate jobs executing with mixed results. The example is run in a timer loop to continually show the flow of events.

files:

scheduling - A Scheduler Example

This is a demonstration of the flexible scheduling features of Oddjob. A file is downloaded via ftp daily. If the download fails after a number of retries an email is sent.

The optional tags file subsitutes dummy jobs to simulate the transfer and email so the demonstration can still be seen working off line.

files:

ant - Running Ant tasks

More examples of runing Ant tasks from Oddjob.

files:

client/server - An Oddjob client and server

This example shows how an Oddjob client can be used to monitor Oddjob running on a remote server.

server files:

client files: