Subject: Re: Problems with cron / crontab
To: beaker <beaker1119@yahoo.com>
From: Martin Weber <Ephaeton@gmx.net>
List: netbsd-help
Date: 01/13/2002 06:46:59
On Sat, Jan 12, 2002 at 07:09:15PM -0800, beaker wrote:
> I think I've accidentally deleted the system crontab file, which I thought
> was in /etc but apparently was in /var/cron/tabs/ .  Is there any way to
> regenerate a
> new one - is it even necessary?

If you did not change it yourself, you can reinstall a virgin one (i.e.
one which is delivered with the system) The normal job it does is calling
the daily, weekly and monthly scripts as well as fire newsyslog to rotate
logs. Well, I guess you want to use it :)

> 
> Also, I confused as to how cron is supposed to work in NetBSD (I'm running
> NetBSD/i386-1.5.2). From 'man 5 crontab' it appears that only the 'system
> crontab', which I guess is /etc/crontab, and/or the root crontab
> (/var/cron/tabs/root ??) , can execute commands, yet any user listed in
> /var/cron/allow can have a crontab file. Why would you want a user crontab
> other than send yourself mail?

I'm using my user's crontabs for @reboot start fetchmail and various little
scripts which bake personal software freshly if they're outdated, and distribute
it to some other computers (who are waiting for such an event with checking some
directories where the stuff goes [procmail] periodically with a user crontab), 
move backups (*~ e.g.) along, tar them up and gzip them and various little other
stuff.

Imagine I had to bug the sysadmin with every new little script I wrote:
"Hey, big guy, please call that script every night at 2 am :)"

-Martin