Let's see what Oddjob can do.
In addition to these examples, there are also many examples
from the Reference, this User Guide, and the Developer Guide
in the examples
directory
All examples should begin with the simplest example possible and here it is!
This example demonstrates executing a batch file from Oddjob and introduces us to using sequences of jobs and variables.
The example consists of 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.
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.
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 files are downloaded from the CME ftp site. This is one of the real life scheduling examples that inspired Oddjob. Points of interest include that the filename contains the date and the files are sourced from different time zones.
An Archive job captures the results of each run. A folder contains Archive Browser jobs that allow the results of previous runs to be viewed.
Demonstrates how Oddjob could be used to schedule jobs over different servers. The three nested Oddjobs - Worker 1, 2 and 3 would be identical job configurations on three different servers. They use a central database to coordinate grabbing for work.
The Distributing Work section of this user guide has another simple example of this.
This example shows how an Oddjob client can be used to monitor Oddjob running on a remote server.
Although here we have the client and server running in the same folder.
If this example doesn't work it might be because your machine
doesn't recognise
localhost
. When you've learnt about configuring Oddjob
come back and try changing the client and server configurations to contain
your network name or IP address.
To see the examples really working across the network
change the client configuration from
localhost
to the name or IP address of your server and run the
client example on a different machine.