Page History
...
Success commands run when a job is a marked as successful in the final stage of Job execution and the Success Command field is populated. The example used in the Job definition screen above simply outputs the values of the special tokens to a log file which also uses the tokens to form the log file name, thus creating a unique log for each run.
Example:
| Code Block | ||||
|---|---|---|---|---|
| ||||
echo "Job $JOB_KEY$, Seq $JOB_SEQ$, Name $JOB_NAME$" >"c:\temp\$JOB_SEQ$_success_$JOB_KEY$_$JOB_NAME$.log" |
...
RED can reference other scripts form the metadata at run-time, this Script Sourcing feature of RED is also available to be used in the Success and Failure Commands, this allows referencing a Host Script from the RED metadata rather than a script that already exists on the operating system.Example success command using a Script Sourcing Token:
| Code Block | ||||
|---|---|---|---|---|
| ||||
python "WSL_SCRIPT_my_python_success_script_CODE" |
When this a Success or Failure Command is executed at run-time triggered RED will do the following:
...