Table of Contents |
---|
| outlinh1. true |
---|
| outlinh1. true |
---|
1 | printablefalse |
---|
2 | stylh1. none |
---|
3 | indent20px |
---|
|
A simple way to reduce the number of jobs or job - chains for shell scripts is to use a generic job. <jobordeh1. "yes"
job, job chain and orders:
Code Block |
---|
language | xml |
---|
title | Example Job (Windows) |
---|
|
<job order="yes"
stop_on_error="no" |
...
...
a example showing the generic execution of a shell script or a shell command">
<script language="shell">
<![CDATA[
echo %SCHEDULER_PARAM_SCRIPT2EXECUTE% |
...
%SCHEDULER_PARAM_SCRIPT2EXECUTE%
]]> |
...
...
...
This job will execute a script or a command which name that is specfied with the parameter "Script2Execute".
Putting Adding this job in to a job chain like the one below <job_chain orders_recoverablh1. "yes"
visible"yes"
titlh1. "ShellExecutor: generic Execution of a shell-script or a command">
<job_chain_node state"Step.100"
joh1. "GenericShellExecutor"
next_state"success"
error_stath1. "error"/>
<job_chain_node state"success"/>
<job_chain_node stath1. "error"/>
</job_chain>this:
Code Block |
---|
language | xml |
---|
title | Example Job Chain |
---|
|
<job_chain orders_recoverable="yes"
visible="yes"
title="ShellExecutor: generic execution of a shell script or shell command">
<job_chain_node state="Step.100"
job="GenericShellExecutor"
next_state="success"
error_state="error"/>
<job_chain_node state="success"/>
<job_chain_node state="error"/>
</job_chain>
|
will start this job every time an order for the job chain is scheduled like this one: <order>
<params>
<paramname"Script2Execute"
valuh1. "dir
Code Block |
---|
language | xml |
---|
title | Example for Order |
---|
|
<order>
<params>
<param name="Script2Execute"
value="dir c:\temp"/> |
...
...
...
...