28 May, 2023

Script not working via crontab

Issue:  

I have written one script which is running fine when i ran it manually  but same script when i have scheduled  in crontab not working.


Solution: 

Source .bash_profile  in your script. It should work.

Especially when you use EOF , you must source .bash_profile in the script

. ~/.bash_profile



OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...