This is a discussion on root ~$ crontab -e blablah :wq => no change within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> hello, just wondering. Whenever I edit the root crontab through crontab -e, changes are never saved. Not a problem ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hello, just wondering. Whenever I edit the root crontab through crontab -e, changes are never saved. Not a problem though, i could by editing directly /var/spool/cron/crontabs/root But I was wondering if it was a feature. I just wanted to change the hour for the cron.hourly and noticed this behavior. I am running slackware 9.0 thanks -- paf the dog remove primate to reply |
| |||
| paf the dog <pafbaboonlechien@neuf.fr> writes: > hello, > > just wondering. Whenever I edit the root crontab through crontab -e, > changes are never saved. Not a problem though, i could by editing > directly /var/spool/cron/crontabs/root > > But I was wondering if it was a feature. I just wanted to change the > hour for the cron.hourly and noticed this behavior. Are you using Vim as your editor? Have a look at this thread - Google is your friend :-) http://groups.google.co.uk/groups?th...rk hill.me.uk hth Glyn -- RTFM http://www.tldp.org/index.html GAFC http://slackbook.lizella.net/ STFW http://groups.google.com/groups?hl=e...inux.slackware GAFL http://www.xemacs.org http://www.gnus.org/ |
| |||
| Glyn Millington grumbled: > paf the dog <pafbaboonlechien@neuf.fr> writes: > >> hello, >> >> just wondering. Whenever I edit the root crontab through crontab -e, >> changes are never saved. Not a problem though, i could by editing >> directly /var/spool/cron/crontabs/root >> >> But I was wondering if it was a feature. I just wanted to change the >> hour for the cron.hourly and noticed this behavior. > > Are you using Vim as your editor? > > Have a look at this thread - Google is your friend :-) argh what a piece of sh... I am many thanks Glyn, VISUAL="/usr/bin/vi" crontab -e did the trick (or simply :set compatible, either) I should have checked google first funny compatible mode is required for root's crontab and not user's -- paf the dog remove primate to reply |
| |||
| > VISUAL="/usr/bin/vi" crontab -e did the trick There is an even easier way to edit your crontab file: crontab -l > /tmp/crontab.txt (use your favorite editor to edit /tmp/crontab.txt) crontab /tmp/crontab.txt regards Henrik -- The address in the header is only to prevent spam. My real address is: hc2(at)uthyres.com Examples of addresses which go to spammers: info@k-software.biz svar@webtelevision.se info@webrider.ru root@localhost |
| |||
| Henrik Carlqvist grumbled: >> VISUAL="/usr/bin/vi" crontab -e did the trick > > There is an even easier way to edit your crontab file: > > crontab -l > /tmp/crontab.txt > (use your favorite editor to edit /tmp/crontab.txt) > crontab /tmp/crontab.txt thanks Henrik atually I seldomly change anything in root's crontab (it is the first time) and I change very few, so, just :set compatible while editing is enough for me. -- paf the dog remove primate to reply |
| |||
| paf the dog <pafbaboonlechien@neuf.fr> writes: > argh what a piece of sh... I am Now, now - don't abuse yourself - there are plenty of folk here to do that for you :-) > I should have checked google first The links below are v. useful! atb Glyn -- RTFM http://www.tldp.org/index.html GAFC http://slackbook.lizella.net/ STFW http://groups.google.com/groups?hl=e...inux.slackware GAFL http://www.xemacs.org http://www.gnus.org/ |
| |||
| paf the dog wrote: >Not a problem though, i could by editing > directly /var/spool/cron/crontabs/root > I've been wondering if it's wrong to edit that file directly. Is it? If so, why? Thanks in advance, StevenR |
| |||
| Steven grumbled: > paf the dog wrote: >>Not a problem though, i could by editing >> directly /var/spool/cron/crontabs/root >> > > I've been wondering if it's wrong to edit that file directly. > Is it? If so, why? as far as I know, crontab -e notifies the daemon that the file is updated. If I update manually the file (well I tried with one of a user) the action does not take place. I think that restarting the daemon would make the update effective, though. I assume the files are scanned on daemon start -- paf the dog remove primate to reply |
| |||
| On Mon, 13 Dec 2004 18:57:20 GMT, Steven <foo@spam.com> wrote: >paf the dog wrote: >>Not a problem though, i could by editing >> directly /var/spool/cron/crontabs/root >> > >I've been wondering if it's wrong to edit that file directly. >Is it? If so, why? > >Thanks in advance, > >StevenR It is OK if you are careful. I do it all the time without problems. Well, one problem: cron only looks for changes once an hour and it is not possible to know when it does its scan. So a change might be ignored for as much as an hour... I cannot find anything in the source that indicates that using crontab -e causes the /cron/crontabs files to be rescanned. buck |
| ||||
| >>>Not a problem though, i could by editing >>> directly /var/spool/cron/crontabs/root >>> >> >>I've been wondering if it's wrong to edit that file directly. >>Is it? If so, why? > It is OK if you are careful. I do it all the time without problems. > Well, one problem: cron only looks for changes once an hour and it is > not possible to know when it does its scan. So a change might be > ignored for as much as an hour... > > I cannot find anything in the source that indicates that using crontab > -e causes the /cron/crontabs files to be rescanned. It leaves a /var/spool/cron/crontabs/cron.update file, containing the username whos cron file should be reread. I think cron checks for this file once in a minute. -- damjan |