Most modern Linuxes also have a facility to all files in a directory. These Linux versions will usually preload your crontab to run at a different directory every hour, day, week, or month. Usually, these directories are called /etc/cron.daily for the once per day, etc.
If your system is so equipped, simply placing a running script, with execute permissions on the appropriate folder, will cause the script to be added to the rotation. If its important, be aware that run-parts runs files alphabetically.
Once the file is put in one of these directories, cron will automatically find it, no need to mess with a crontab file at all, and since run-parts is executed from the system crontab, everything is run as root.
HTH
Kevin
On Jul 29, 2010 11:11 PM, "keith smith" <klsmith2020@yahoo.com> wrote:
Hi,
I have been setting up a cron job and found out there are two different crons. 1) the user cron located at /var/spool/cron/ on my Fedora Box and 2) the system crontab located at /etc/crontab .
When I do the crontab -e (if I am recalling correctly) I am editing the user crontab.
To edit the system crontab do I just use VI or some other editor?
I would have thought if I were root and issued crontab -e I would have been editing the system crontab, however this was not my experience.
Thanks in advance for your insight.
------------------------
Keith Smith
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss