Subject: Re: /var/cron -> /etc/cron
To: None <feico@pasta.cs.uit.no>
From: Curt Sampson <cjs@cynic.net>
List: current-users
Date: 04/02/1999 16:40:23
On Fri, 2 Apr 1999, Feico Dillema wrote:

> For cron, I guess
> the problem with putting a user's crontab is that a crontab is now local
> to a machine, while users' homedirectories are often shared among machines,
> i.e. NFS-mounted. But couldn't we solve that by adding a `hostname' field
> to crontab entries, or encode it in the tab-name, like: /home/<user>
> /.cron/<hostname>?

We could, but there's more to it than that. Here are a couple of
problems that I've thought of.

1. Cron has to check for and load updated crontabs every time it
runs. As it is now, this is fairly cheap: just walk through every
file in the tabs directory. If we move to putting crontabs in home
dirs, it has to do a stat() for every user on the system, rather
than every user that has a crontab. This is bad enough on a system
with 3000 users, only 20 of which have cron jobs. But if we also
use something like AMD to mount users home directories, we now do
an NFS mount for every user, once per minute. On every machine on
the network. This is a disaster.

2. Cron, I think, expects crontabs without syntax problems. Crontab(1)
does syntax checking and won't let a bad one in. If we change to
crontabs in home dirs, the users will now have access to write them
directly, and cron itself will have to do a syntax check. Presumably
it would have to send e-mail or something if it the syntax was
broken.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   604 801 5335   De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: http://www.netbsd.org