cancel
Showing results for 
Search instead for 
Did you mean: 

Passing return code to post command script?

fl
Level 4
Does anyone know how to pass the return code of the Backup Exec job down to its post command script?  I basically need a way to have the post command script run one set of commands if the backup job success or another set of commands if the backup job fails.

Thanks in advance.
1 REPLY 1

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified
The bemcmd admin guide shows that that -o21 option should return the status for completed jobs - however you may not be able to use it in a post command as the job cycle may not be officially completed until any post commands in the job have also completed.

As such you might have to use it with the Windows task scheduler in such a way that it is timed to run when you know the job should have finished.

More info on bemcmd can be found 
 http://entsupport.symantec.com/docs/308991

Also as bemcmd only returns text output for the status, you will need to get clever with your own scripting to make something happen depending on the result in the output