replaced crontab, now should get crontab back to what it was
Hi all,
I was trying to learn how crontab works. I made a file with an echo command in it and used crontab -u root myfile. The problem is that when i checked crontab -l i saw that all other jobs were gone and there only was myfile. I used crontab -r in hope that after removing it'll be back to its before jobs. But now when i use crontab -l it says 'no crontab for root'. I tried service crond restart, but no change. How can i get it back to the way it was? Though i had no idea what jobs it had. This is very urgent as i did on an important server. Thanks for the help in advance. Ramin. |
Do you have a backup?
Look for /var/spool/cron/root |
Yes, it was there :cool: and i used it to restore crontab.
Thank you so much for great help. Ramin. |
All times are GMT -5. The time now is 07:48 PM. |