AuthorTopic: can not edit crontab (Read 5633 times)

when I edit cron with crontab -e, it lets me make the changes and then will not write them out

I found another thread on here talking about this exact issue, but the response was go edit cron with something else and it should be fine.

first, crontab is part of the os so I think it should work. Second crontab notifies the crond to reread the file once it has been updated which editing with another editor will not do.

any thoughts on this?

oh, yes I did do crontab -l to see that all my changes were wiped out.

thanks!

Logged

Evil Overlord rule 58 My doomsday device will not employ a large red digital countdown device unless it is absolutely necessary. If a countdown device proves to be necessary, the doomsday device will be set to activate when the counter reaches 00:10:00, rather than 00:00:00.

Thanks for the response, but I know crond is running, found that out with ps -e | grep cron

I should be able to edit root cron with crontab -e ( as you did ) which it will let me do. but when I do "wq" to write out the chagnes they are thrown away.crontab -l confirms my edits are gone.

thoughts?

Logged

Evil Overlord rule 58 My doomsday device will not employ a large red digital countdown device unless it is absolutely necessary. If a countdown device proves to be necessary, the doomsday device will be set to activate when the counter reaches 00:10:00, rather than 00:00:00.

1st idea....I imaging Vim is the default editor for crontab in 5.9 just as it is in 6.0.I'm not an expert on VIM so I use the book "A practicle guide to Linux Commands, Editors and shell programming" to help me out. I couldn't find the command "wq" anywhere in the chapter associated with Vim.

Try making the changes but this time exit out with shift ZZ from command mode. Thats 'shift'+'z''z' not 'ctrl' + 'z''z' the book mentions to be careful of this.It also mentions that you need to have exited out of INSERT mode with Esc because shift ZZ will only work in command mode.You can use the tut as an example of this.

2nd idea..Create a text file with the crontab instructions you want and name it something.txt and place it in your /home/username directory. Then just...crontab ~/something.txtThe tut has an example of this as well.

If these don't work then maybe a fellow 5.9 user can be of help, I just don't have 5.9 on any of my machines currently and perhaps it is using a different editor by default.

set backupskip+=/var/spool/cron/*The system wide vimrc is in /usr/share/vim/vimrc iirc, or you can just use /root/.vimrcThis is fixed in our Vim 7.2 packages for VL6, but I couldnt backport the fix yet.Let us know if it works for you.

Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."Jorge Luis Borges, Avatars of the Tortoise. --Jumalauta!!

rbistolfi, thanks for your response. I agree not a huge bug since there were several work arounds for it, though I wonder if there are other larger issues.

for example I edited /root/.vimrc and there was no effect at all so i had to edit /usr/share/vim/vimrc to get the change.

I'd really like to thank all those folks out there who read and provide support. This is the reason I use VL instead of something else.

thanks again.

Logged

Evil Overlord rule 58 My doomsday device will not employ a large red digital countdown device unless it is absolutely necessary. If a countdown device proves to be necessary, the doomsday device will be set to activate when the counter reaches 00:10:00, rather than 00:00:00.