...
How it works
The job chain chain_a
is very simple. It consists consists of two steps, "first" and "second". Both steps use the same job readparam
. The readparam
job is a small JavaScript job which reads all order parameters and logs them on info
-level.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job order="yes" stop_on_error="no"> <params /> <script language="javax.scriptjava:ecmascriptjavascript"> <![CDATA[ function spooler_process(){ var orderparams = spooler_task.order().params(); spooler_log.info("State: "+spooler_task.order().state()); spooler_log.info("Params:"); var paramNames = orderparams.names().split(";"); for( var i in paramNames ) { spooler_log.info( " "+paramNames[i] + "=" + orderparams.value( paramNames[i] ) ); } return true; } ]]> </script> <monitor name="configuration_monitor" ordering="1"> <script language="java" java_class_path="" java_class="sos.scheduler.managed.configuration.ConfigurationOrderMonitor"/> </monitor> <run_time /> </job> |
...
For example, if a job chain consisted of three steps:
...
- transfer a file by FTP to host a,
...
- transfer a file by FTP to host b,
...
- delete file.
You could use the same job for steps 1 and two 2 using different parameters for each job.
...
In job chain parameter files the ${paramnamePARAMNAME}
-syntax can be used to reference:
- order parameters
- order parameters defined in the job chain parameter file
- global scheduler JobScheduler variables
- environment variables
...