You are not logged in.

#1 2007-04-10 22:34:35

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150
Website

crontab editing doesn't work as advertised.

In the crontab I am advised very sternly to never edit the crontab manually, but to use "crontab -e". However, this command only gives me a gvim with a blank new file. What do I have to be able to actually edit my crontab?

EDIT: The problem is that crontab and gvim don't work together. Changing $VISUAL to vim makes it work, but IMO that's a hack, and the original problem still stands.

Last edited by kamagurka (2007-04-12 10:39:24)


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

#2 2007-04-10 22:42:50

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: crontab editing doesn't work as advertised.

It's probably a proper file - just waiting to be filled up (I don't know how users' crontabs work on Arch, actually).

Run "crontab -e" as root, you'll see more verbose output.

Offline

#3 2007-04-10 22:57:47

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150
Website

Re: crontab editing doesn't work as advertised.

Actually, I won't. If I run "crontab -e" as root, a gvim opens with an empty new file. However, I know that can't be right since "crontab -l" shows what my  crontab looks like, and it's definitely not empty.


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

#4 2007-04-12 06:50:07

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: crontab editing doesn't work as advertised.

each user has it's own crontab file. I.e. root's crontab and yours are different. As far as i know the only way to edit the crontab file is using 'crontab -e'. If you are not happy with the editor set EDITOR environment variable to your preferred one. i.e. "export EDITOR=emacs"

Hope it helps

Offline

#5 2007-04-12 08:55:09

Manifold
Member
Registered: 2006-08-16
Posts: 64

Re: crontab editing doesn't work as advertised.

On my system, setting the $EDITOR variable doesn't affect which editor launches from 'crontab -'.

I have to use 'export VISUAL="jpico"' in my .bashrc for it to work.

Offline

#6 2007-04-12 10:32:56

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150
Website

Re: crontab editing doesn't work as advertised.

OK, the problem seems to be a bug in gvim or crontab, I'm not sure. The point is that it doesn't work with gvim. Somehow, gvim doesn't get the file correctly from crontab, stranding me with an empty file that gets completely ignored upon save. My workaround is to change $VISUAL to vim right before using crontab -e (I'll probably slap this in a little script), since, for some reason, it works completely fine with vim.
So, my problem is solved, now, but I still think there's an underlying compatibility problem between gvim and crontab. Does anyone know how to narrow this down to only one culprit?

Last edited by kamagurka (2007-04-12 10:38:20)


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

Board footer

Powered by FluxBB