1753802 Members
8114 Online
108805 Solutions
New Discussion юеВ

vi and cron

 
Brauer Tom
New Member

vi and cron

Is there any problem using vi to edit crontab files as opposed to using the
crontab utility?
3 REPLIES 3
Fernando Santana
Frequent Advisor

Re: vi and cron

Your really want to edit a copy of your current
cron file. You can have a problem if two or more
people edit the file cuncurrently.
Paul Hite_2
Frequent Advisor

Re: vi and cron

The crontab command will default to the vi editor and you can use the EDITOR
environment variable to use another editor.

Ordinary users cannot edit their crontab files directly. But they can use the
crontab command.

Also the crontab command will notify the running cron to reread the crontab
file after you modify it.
Joel Stewart_1
New Member

Re: vi and cron

If you edit the crontab file directly with vi, the change will not take effect
unless you tell crontab to re-read the file.

You should always use crontab -e to edit your file -- otherwise, you will be in
for a surprise when you change didn't take.