[Tfug] /etc/crontab vs /etc/cron.*

Claude Rubinson rubinson at u.arizona.edu
Wed Nov 19 14:47:02 MST 2008


On Wed, Nov 19, 2008 at 02:07:06PM -0700, Christopher Robbins wrote:
> Is there any difference between setting scripts to runvia crontab versus
> dropping a copy in /etc/cron.* (daily/hourly/weekly)?
> 
> I understand that crontab runs the scripts within the
> /etc/cron.* directories, but I'm wondering if there's any
> specific advantage to one or the other...I've always used
> the respective directories, but is there a difference between
> the two?

The observable difference, of course, is that you put simple shell
scripts in /etc/cron.* whereas you for user cron jobs you need to
write the appropriate cron entry.

But to answer your question, you want to use /etc/cron.* from system
scripts (which are run as root).  User jobs should be added via
crontab -e.

Claude




More information about the tfug mailing list