Re: crontab



On 2006-12-22, Jan Panteltje <pNaonStpealmtje@xxxxxxxxx> wrote:
On a sunny day (22 Dec 2006 02:14:02 -0800) it happened
"suzan.james@xxxxxxxxx" <suzan.james@xxxxxxxxx> wrote in
<1166782442.156883.98590@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:

Thanks. I knew I can use crontab -e but ow can I save it and exit?
I did not find any resource on web. I can only use ctrl-z but it
terminates the editor

Just as root use:

crontab -l > myconfig

Then use any editor to edit 'myconfig'.

(I use joe as editor, vi sucks, joe is a full screen editor).

<space for flames>

then reload crontab:
crontab myconfig

Now you can put myconfig wherever it is _you_ like by specifying the full path.

<space for flames>

LOL
Works for me :-)


you can also do "EDITOR=joe crontab -e"

or add "export EDITOR=joe" to your .bash_profile file and use "crontab -e"
(after logging out and back in etc)

Bye.
Jasen
.



Relevant Pages

  • Re: crontab
    ... crontab -l> myconfig ... Then use any editor to edit 'myconfig'. ... <space for flames> ...
    (comp.os.linux.development.apps)
  • Re: crontab
    ... crontab -l> myconfig ... Then use any editor to edit 'myconfig'. ... <space for flames> ...
    (comp.os.linux.development.apps)
  • Re: crontab -r help
    ... Post Errors and there were four dated 30/12/2007 where I had a power supply ... Now turned to remove the crontab entry as advised by the warning message. ... # SSA warning: hardware to go undetected. ... if environment variable EDITOR is set to "vi". ...
    (comp.unix.aix)
  • Re: crontab -r help
    ... Post Errors and there were four dated 30/12/2007 where I had a power ... Now turned to remove the crontab entry as advised by the warning ... # SSA warning: hardware to go undetected. ... You can use any EDITOR you like, but if not set to "vi" you ...
    (comp.unix.aix)
  • Re: Programmatically edit crontab
    ... 'crontab -e' retrieves info from cron and stores ... an editor named in environment variables VISUAL or EDITOR, ... 'crontab' itself is a privileged program, ...
    (comp.os.linux.development.apps)