state:equals

Description

Runs it's child job and then compares the state of the child job to the given state. It's own state is complete if the states match, incomplete otherwise.

This job is probably most useful in it's 'not equals' form - i.e. to check when something hasn't completed.

Properties

NameDescriptionRequired
name A name, can be any text. No.
state The state to match. No, defaults to COMPLETE.
not Changes this job to 'Not Equals' No.

Elements

job

Required: Yes.

The job to run who's state will be compared.

Example

<sequential xmlns:state="http://rgordon.co.uk/oddjob/state"> <jobs> <state:equals not="true"> <job> <exists file="mydb.lck"/> </job> </state:equals> <echo text="Backing up the Database..."/> </jobs> </sequential>


(c) Rob Gordon 2005 - 2009