Hello,
I am working one one script where I am using the below code which is using to connect with MKS client when I run my script manually it works effiecently i.e. it connects with MKS client but when I run it from CRON it doesn't connect.
1)Can some one tell when it is running from cron how could I check whether the variables are getting popuated or not
2)Is there any methodwith wich I can achieve this I need to trun this script from cron.
MKS_Connection()
{
si connect --hostname=si.pan.com --port=7001 --user=Lintomation --password=Lin4tw --yes
ReturnCode=$?;
if [[ "${ReturnCode}" -ne "0" ]];then
echo "Issue found during connection" | mail -s "MKS Connection issue1 from STP" rohit.sin@tlport.com
exit 1;
else
echo "Connection to MKS Client is in progress" |mail -s "MKS Connection1 FROM STP" rohit.sin@tlport.com
fi
}
MKS_Connection
Thanks in advance