After upgrading to vSphere 5.1, I am not able to add my scripts to the cron of my ESXi nodes.
In /etc/rc.local I added the following code to schedule my scripts:
/bin/kill $(cat /var/run/crond.pid) echo '1 0 * * * /sbin/script1.sh' >> /var/spool/cron/crontabs/root echo '2 0 * * * /sbin/script2.sh' >> /var/spool/cron/crontabs/root /bin/busybox crond
This worked fine, the scripts were automatically scheduled and were persistent after a reboot of a node.
After the upgrade I'm not able to schedule my scripts anymore.
I've adjusted the above code and wrote it to the /etc/rc.local.d/local.sh file:
/bin/kill $(cat /var/run/crond.pid)
echo "1 0 * * * /sbin/script1_ssh.sh" >> /var/spool/cron/crontabs/root
echo "2 0 * * * /sbin/script2_file.sh" >> /var/spool/cron/crontabs/root
/usr/lib/vmware/busybox/bin/busybox crond
After a reboot the /var/spool/cron/crontabs/root file isn't updated anymore!!!!
Can someone help me out with this issue?
Cheers