[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Crontab Editing Question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> This may sound like a silly question, but what is the
> difference between editing your crontab (/etc/crontab)
> via your fav text editor -vs- doing it by issuing
> "crontab -e"..?

No real difference at all.  I know sometimes crond won't see that 
there's been a change to the file, so I've seen it recommended 
someplace that you do:

touch /var/spool/cron/username

(or wherever the crontab file is) to make sure the last-updated time 
gets set properly.  I've never had a problem though.

No reason you can't set your favorite editor to be the one that the 
"crontab -e" command (or anything else that auto-opens an editor for 
that matter) uses though.  Just add lines in your .bashrc or .profile 
(or /etc/profile if you want it to be for all users system-wide) like

VISUAL=emacs
EDITOR=emacs
export VISUAL EDITOR

or whatever... (set both as some programs may check different 
environment variables)

- -- 
Bruce Timberlake

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+VTVdvLA2hUZ9kgwRAl3mAKCEoJKU7pIVgNIuAn9m1XU0wB2gtgCfYvHi
otnup7U8oXsD41KFZ6tI8bs=
=a/1A
-----END PGP SIGNATURE-----