[Index]

archive


A Job that is capable of taking a snapshot of the state of it's child jobs. An archive-browser can be used to browse an archive created with this job.

Property Summary

archiveIdentifier The identifier of the snapshot that will be taken when this job runs.
archiveName The name of the acrhive that all snapshots will be stored in.
archiver The persister to use to store archives.
job The child job.
name A name, can be any text.

Example Summary

Example 1 Create an archive after each scheduled run.

Property Detail

archiveIdentifier

Configured ByELEMENT
AccessREAD_WRITE
RequiredYes.

The identifier of the snapshot that will be taken when this job runs.

archiveName

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The name of the acrhive that all snapshots will be stored in.

archiver

Configured ByELEMENT
AccessREAD_WRITE
RequiredYes, but will fall back on the current Oddjob persister.

The persister to use to store archives.

job

Configured ByELEMENT
AccessWRITE_ONLY
RequiredNo, but pointless if missing.

The child job.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

A name, can be any text.


Examples

Example 1

Create an archive after each scheduled run. The time of the schedule is used to identify the archive.

<oddjob id="this">
    <job>
        <sequential>
            <jobs>
                <scheduling:timer id="the-timer" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling">
                    <clock>
                      <value value="${clock}"/>
                    </clock>
                    <schedule>
                        <schedules:count count="3" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
                        	<refinement>
                        		<schedules:interval interval="00:00:00.100"/>
                        	</refinement>
                        </schedules:count>
                    </schedule>
                    <job>
                    	<archive archiveName="Batch_01">
                    		<archiver>
                    			<file-persister dir="${this.args[0]}"/>
                    		</archiver>
                    	    <archiveIdentifier>
                    	    	<format date="${the-timer.current.fromDate}" format="mm_ss_SSS"/>
                    	    </archiveIdentifier>
                    		<job>
		                        <echo>Run at ${the-timer.current.fromDate}</echo>
                        	</job>
                        </archive>
                    </job>
                </scheduling:timer>
            </jobs>
        </sequential>
    </job>
</oddjob>


(c) R Gordon Ltd 2005 - Present