trigger

Description

Used to fire state dependent events such as a schedule.

The trigger will fire on the given state, and will be reset when the object being triggered on goes to any other state.

The trigger will fire to the COMPLETE state regardless of the state being triggered on.

A trigger job is most useful when added to a sequential which will then COMPLETE when all it's child jobs/triggers complete.

Properties

NameDescriptionRequired
name A name, can be any text. No.
state The state to trigger on. No, defaults to COMPLETE.
on The job to trigger on. Yes

Example

 <sequential name="Trigger on Two Things">
   <scheduler>
     <schedules>
       <trigger id="trigger" job="${notify}" on="${watch-both}" />
     </schedules>
   </scheduler>
   <folder>
     <sequential id="watch-both" name="Run me first!" >
       <trigger on="${thing1}" />
       <trigger on="${thing2}" />
     </sequential>
     <echo id="thing1" name="Run me!" text="Thank you" />
     <echo id="thing2" name="Run me!" text="Thank you" />
     <echo id="notify" name="Don't run me" text="You ran two things!" />
   </folder>
 </sequential>
    


(c) Rob Gordon 2005