Re: Trouble with cron
* Johannes Wiedersich (johannes@physik.blm.tu-muenchen.de) wrote:
>
> Which editor are you using? Please do a
> ll /etc/alternatives/editor
Oddly it says nano as well, but my EDITOR and VISUAL variables are
both set to emacs, which is that which I use generally. And that is
what was invoked with crontab -e both times, and not nano. BTW, I
found that just as with Slackware, the EDITOR variable does not seem
to change the crontab editor, but VISUAL does. I found it out as in
trying to intentionally use vi instead I had to change VISUAL to make
it come up. Nothing online seemed to indicate this is so but the
Debian helps and such all mention EDITOR. Have you had this
experience?
> since I configured nano as the default editor. I suspect that you might
> unknowingly run an unfamiliar editor and might unknowingly quit without
> saving.
Okay, I think I figured it out. In typing this email I was going to
yank in the output of crontab -l as it is odd. At first I was running
very small test tasks just to see if it was doing something. Nothing
useful was produced by crontab -l. But when I tried some more
complicated echoes and such I found that my prompt was being printed
over the output and then a new prompt put in right after. I then
realized one mistake I was making, though I doubted it was the main
problem, and that was no newline at the end of the line. I added this
and it would seem it may have been the problem all along. I am going
to continue to test this and see for sure, but as of now all I can say
is be careful to include a newline at the end of the last line in the
crontab. I never realised this was essential. Probably always had
one without thinking about it before.
>
> You can change it to your favourite editor (provided it is installed) by
> running
>
> update-alternatives --config editor
>
This a cool feature, but what about the nano thing above. I don't get
nano for anything, and didn't even know it was installed. Is the
above configuration really even doing anything? How can I find out?
> In contrast to other distributions, in debian one can configure
> different alternatives for common tasks.
>
> On my sytem, eg., there are 6 alternatives for an editor and
> 3 alternatives for different versions of ghostscript.
I would be interested in knowing how you set that kind of thing up.
Can you direct me to a website with some info?
Many thanks for the help Johannes.
Patrick
Reply to: