I have a autosys job with the below command
cd /homes/epsi95/sanity_check/build-config && ./run.sh postcheck_definition.json
Description: There is a run.sh
file inside /homes/epsi95/sanity_check/build-config
, I cd
ing into that folder and running the command and passing the command line argument ./run.sh postcheck_definition.json
But the job is failing. But when I run the command from the command line it is working perfectly. How can I fix it?
I would suggest two ways.
Modify the command to run the script referring the absolute path. Do consider to check and modify the script if using a relative path to absolute path.
command: sh /homes/epsi95/sanity_check/build-config/run.sh postcheck_definition.json
In Linux multi-line command can be passed using ; as the keyword.
command: /homes/epsi95/sanity_check/build-config ; ./run.sh postcheck_definition.json