Automic Workload Automation

  • 1.  Linux Job issue

    Posted Apr 19, 2018 04:09 PM

    need to create a UNIX job with below command.

     

    /data/LTTR/OBCDIN_b

    the command should run with user XYZ but before executing it should run the ./profile 

     

    I use the below in process tab but it does nothing.

    . ~XYZ/.profile

    /data/LTTR/OBCDIN_b

     

    but it does not run the job on the server.

    Could someone tell me where am I going wrong?

     

    TIA

    SHANI



  • 2.  Re: Linux Job issue

    Posted Apr 20, 2018 05:34 AM

    Hi.

     

    A few ideas to get you started:

     

    "." is a bashism. Are you using bash, or any other shell? In case of other shells, try:

     

    source ~XYZ/.profile

     

    Also, the "~" only works with certain shells (sh, bash), try specifying the whole path instead. You can also try to echo any errors back to the Automic report:

     

    source /path/to/.profile || echo "error $?"

     

    Afterwards, check the Automic report for any error messages.

     

    Hth,

    Carsten

     

    edit: I just realized your problem is not so much the "profile" part, but you say it does not start the command afterwards? In that case, check your .profile, if it has something in it that terminates the shell, or has anything that takes interactive input (which doesn't go well with Automic), or narrow it down by breaking your .profile into small, basic chunks and see if these work. Also, does it work if you chain the two commands in a shell script without Automic?