AnsweredAssumed Answered

How to run a UNIX Korn shell script - best practice in Automic V10 jobs.

Question asked by Stan_Milbrath_6353 on Mar 9, 2016
Latest reply on May 2, 2016 by DanielWolnik606911
I am trying to run a UNIX Korn shell script in Automic Engine v10 and am having difficulty making it talk back to the Agent properly all the way through the execution. I've tried it via COMMAND option and using the path/program.sh, running it using the path/program.sh listed in the "Process" tab and also imbedding the script into the "Process" tab. All 3 methods are not correctly working.

The latest attempts got the Agent seeing the early exit codes (if failure), but it never has successfully ended properly on the Automic side, even though the script ran to successful completion on the host server. The JOBS either runs and runs without ever getting a RC telling it to end or in the latest examples - it ends with 0 RC, but the JOBS ends prematurely with "ENDED_VANISHED - disappeared" when running the script directly in the "Process" tab, not as batch.

Originally when running the JOBS in "COMMAND' option, the JOBS would fail until the Agent INI file was changed to run as "Batch" mode instead of "Fork". That was due to permissions when starting out as 'root', the script branches off to an Oracle connection under an Oracle ID.

Changing the INI file to 'Batch' mode resulted in the JOBS loses the PID and not capturing any exit codes. and therefore not ending. 

Does anyone have suggestions or best practices I can relay to my UNIX Admin team to configure their script properly? If you know of some good questions for me to ask them, that too would be helpful. We run plenty of imbedded UNIX commands in the 'Process' tab in JOBS and have no issues with them.

I am not a UNIX guru and am working with two who are, but together we can't get this JOBS to work properly. The last two runs from imbedded script in the process tab did produce a run report showing what the script did, but simply stops recording a different points and the JOBS ends with the "ENDED_VANISHED - disappeared" error. Thanks, Stan

Outcomes