Page 1 of 1

Need help with Executing shell script

Posted: Tue Oct 06, 2009 10:12 am
by theone
I have a complex stored procedure I created shell script to call it on unix box. I'm little confused how to integrate the script in job properties to run it after the job.

This is what I did:

In After -job subroutine I selected ExecSH and provided the script path as /export/home/project/shell.sh


I want to know is that the right process, if not can I know the right way.

Thank you.

Posted: Tue Oct 06, 2009 10:15 am
by chulett
It's certainly *a* right process and how you would do it 'after job' as part of the job in question. Another option would be to use a Sequence job to first run the job and then use an Execute Command stage to run the script as a separate action after the job completes.

Posted: Tue Oct 06, 2009 11:12 am
by theone
I can try that, that raised one more doubt. If I have multiple scripts can I do like this way: "/export/home/project/shell.sh; /export/home/project/shell2.sh"

Posted: Tue Oct 06, 2009 11:22 am
by chulett
Sure, the normal syntax for executing multiple commands applies. You might want to use "&&" rather than ";" as the former is conditional, an error stops anything after that running.

Posted: Tue Oct 06, 2009 11:24 am
by theone
thanks for your reply