|
|||||||||||
|
|
Oddjob Quick Start Guide
Writing a Simple Oddjob FileOddjob configuration files are written in XML. Each Oddjob file contains an Oddjob and may contain 0 or 1 jobs for Oddjob to run. A file with no job for oddjob to run is a complete waste of time but perfectly legal.
A file with one job would be something like:
Each job in an Oddjob file (except the top level oddjob) can have a name attribute. The name can be any text allowed as an XML attribute. The name is used in monitoring and warning messages - it doesn't need to be unique but it can be clearer if it is. Each job in an Oddjob file (including the top level oddjob) can have an id attribute. A job can be referred to elsewhere in the file by it's id value. An id must be unique and must not contain the characters .()[]. Running More than One JobOddjob will only execute a single job but that single child could be a job like sequential or parallel.
By using sequential and parrallel jobs within each other, complicated dependencies can be built up. PropertiesBy specifying a text attribute for the echo Job we were setting it's text property. This property is also available to be used to set other job's properties. If our echo job had the id "my-echo" we can access it's text property using the syntax "${my-echo.text}" as in this example:
Scheduling JobsOddjob can schedule a job to run at certain times, on certain days, in certain months etc etc. To get oddjob to do this you need a Scheduler Job. You then add any number of Schedules to your Scheduler Job. The jobs you want scheduled are defined elsewhere - generally in a foler. Here's an example:
StateA job can be in one of the following states:
A job must be reset to the ready state before it can be executed again. The scheduler will do this automatically but when manually re-running a job it is useful to understand the difference between a hard reset and a soft reset. A soft reset will reset a Not Complete state job or an Exception state job but will not reset a Complete state job. A hard reset will reset any job that has finished executing. These two reset levels are useful with sequences of jobs. A sequence can be reset without resetting jobs that completed successfully, or it can be reset so that all jobs are reset. Using Oddjob DesignerOddjob Designer is a GUI tool for creating Oddjob XML configuration files. Oddjob Designer can be started from OddjobExplorer. Warning: When saving a file in Oddjob designer, it will reformat the xml and remove any comments! |
||||||||||