Should have just left it alone!
After many months of just running along in the background I recently decided to write a little lua script. No doubt due to my poor programming it was leaking memory and eventually caused the inevitable crash :-(
Before I had realised what the problem was I had tried to edit the cron and the lack of memory caused my cron file to be overwritten with a blank file. I've recovered the cron file but I am having trouble re-connecting the cron file with it's link in the /var/spool/cron/crontabs directory.
As I understand it the file in /var/spool/cron/crontabs should be a symlink to /etc/crontabs/root and should have permissions 1rwxrwxrwx. I've tried several methods to get the system setup in this fashion but nothing seems to work. Now when I edit the cron using crontab -e the file is shown as being /var/spool/cron/crontabs.xxx This works OK but I get the feeling it may cause me further grief in future.
I've tried:
crontab root
stopping and restarting crond
rebooting
creating the symlink manually
deleting the root file and starting from a blank file
and I'm still not able to get the file setup correctly.
Any pointers would be greatly appreciated.
Allan
Alan,
The correct way to edit the crontab file is to invoke "crontab -e" this will fire up an editor and do the work once you exit the editor to get it in place.
Brett