Hi All,
DS 8.7 on Windows
I have a Sequence job that has an Exception Handler stage that sends an email in case of an exception. When I run (fail) this job from the Designer Client it works fine, meaning sends an Email in case of failure, as expected.
But when I Invoke the same job with same parameter sets from a shell script it does NOT send out the email in case of failure, as we would expect
(for Email we are calling a Stored Procedure from a batch file invoked from the Execute Command activity)
Job Activity (SU) --> Job Activity (SU) --> Execute Command (Success Email)
Exception Handler --> Execute Command (Failure Email) --> Terminator Stage
For Success email it works both ways
Thanks
NV
Exception Handler Not Working when DS invoked from Shell Scr
Moderators: chulett, rschirm, roy
Resolved
This was happening because the dsjob was called from the shell script using the option -warn 1 and hence as soon as the first warning prior to the failure was logged, the job aborted and hence the Exception Handler was not executed (hence no email)
Changed this to -warn 2 in the dsjob command and now it is sending the failure email as expected.
This was happening because the dsjob was called from the shell script using the option -warn 1 and hence as soon as the first warning prior to the failure was logged, the job aborted and hence the Exception Handler was not executed (hence no email)
Changed this to -warn 2 in the dsjob command and now it is sending the failure email as expected.