(See Also: rush -donecommand)
Optional.
When a job dumps, after the 'framelist' and 'jobinfo' files are saved
in the LogDir, the optional DoneCommand script can be
executed. This command can be used to compress logfiles, or parse them
for errors, or yield customized web page reports, etc.
This command is executed only once, on the job server.
If the done command is set to '-', or if donecommand is not specified
at all, it will be disabled.
For the DoneCommand to be executed, the job must dump. For automatic invocation,
you will need to have the AutoDump command enabled,
for the job to dump when all the frames are done. If AutoDump is disabled,
the only way the DoneCommand will execute is if someone manually invokes
'rush -dump'.
DoneCommand scripts are passed the jobid in the RUSH_JOBID environment variable,
so it's possible for the script to use rush(1) commands to query the job.
Exit codes are currently ignored. The stdout and stderr output from the
DoneCommand is written to a file called 'done.log' in the
LogDir.
 |
 |
 |
 |
#!/bin/csh -f
# EXAMPLE 'DoneCommand' SCRIPT
set $wwwreport = /somewhere/MYPROJECT/html/`logname`/jobreport.html
# CREATE A CUSTOMIZED WEBPAGE REPORT
set logdir = `dirname $RUSH_LOGFILE`
cat $logdir/framelist | \
my_report_generator > $wwwreport
# MAIL THE REPORT TO SOMEONE
Mail -s "$RUSH_JOBID Html Report" `logname` < $wwwreport
|
|
|
 |
 |
 |
 |
The DoneCommand should avoid doing anything to the job that might
make it continue running. Though possible, this would confuse someone
manually trying to dump the job, only to find it requeuing itself.
 |
 |
 |
 |
donecommand - |
# Disable done commands |
donecommand $cwd/cleanup |
# Setup script to run before job dumps itself |
|
|
 |
 |
 |
 |
|