Thanks for the response. I tried giving full path and placed the script in the /root path.
Now on executing ./xx.sh from root path, the service is getting restarted as expected.
But on using root crontab, restart is not working.
*/5 * * * * /root/xx.sh
ps auxw | grep ESDEMO | grep -v grep > /dev/null
if [ $? != 0 ]
echo "service was not running and has been restarted"
echo "service is running on $(hostname) as on $(date)"
Please help on this.
The error that I am getting is:
CASMG99999E 0000,Message file missing. 12:15:01
CASMG99999E CF0038,casstart,ESDEMO,0000 12:15:01
Last edited by UserLinux123; 04-26-2016 at 07:23 AM.
Reason: Added error message.