Hi Prabagaran,
If I was in your place, I would have used the below script and run it as a daemon as root user.
You can follow the below steps.
Code:
vim /root/cron.sh
while true
do
pgrep crond &>/dev/null
if [ $? -ne 0 ]
then
service crond start
fi
sleep 30
done
chmod 700 /root/cron.sh
nohup bash /root/cron.sh &
Also, to make it last across reboots append the below line in /etc/rc.local
Code:
nohup bash /root/cron.sh &
This script will check for the cron service (crond daemon) after every 30 seconds and if the service is not running, it will start the cron service.
Hope this helps.