VISUAL=gvim makes crontab -e open a new crontab instead of a current one
My VISUAL setup interferes with my cron jobs.
crontab -lworks all right, I see my previous jobs.
crontab -e -u user-here- opens GVIM on an empty file
- checked cron.allow or .deny, nothing, did add cron.allow with my user, nothing changed
- 1 and 2 are even AFTER I've added my user to
sudo usermod -aG crontab user-here. This made it see the
/var/spool/cron/crontabsdir (but not the user crontab file inside?).
sudo crontab -e -u user-here- opens Vim on my desired file that's the workaround fellas, not a fix, but gets the job done
vim /var/spool/cron/crontabs/your-user-hereworks and opens the file as expected, allows edition, but then you have to
kill -1 your-cron-demon-here, or sent the SIGHUP another way, so cron process knows to re-check config files. A much worse workaround.
So, now I know it's the editor setup. Cron looks at two variables
EDITOR, so I checked my configs and sure, I had VISUAL set (
VISUAL=gvim). I've reset it, opened a new terminal and nothing.
Works as I want crontab -e to work
sudo crontab -e -u your-user-here
VISUAL=""; crontab -e
How to "fix" visual editor so it opens my crontab, and not an empty one?