Subject: Re: crontab(1,5) entries
To: Laine Stump <lainestump@rcn.com>
From: Richard Rauch <rauch@eecs.ukans.edu>
List: netbsd-help
Date: 02/17/2001 01:56:47
> > If you start a process with cron which never exits - what happens when
> > the time comes to start it again? You want two? three? four of these
> > never ending processes?
> 
> If you put an entry in crontab with "@reboot" at the beginning of the
 [...]

Yes.  I should have mentioned that I was using @reboot.  I guess that, in
part, I assumed that people could just read my mind, and would know that
there was no danger, here.  Mea culpa.


> > If you want a program to start at boot time then you should consider
> > putting it in /etc/rc.local.
> 
> You can't do that if you don't have root privileges on the machine in
> question. In that case, adding an @reboot line in your personal

Indeed.  I should have given more explicit information about what I was
trying to do.  I appreciate the attempt on the part of others to keep me
from getting an arbitrary number of processes running.  And, yes, I could
shove it into a boot-script as root, but since this isn't a regular system
daemon, that seemed like the wrong approach.  Also, it seemed worth
flexing cron a little---I haven't really messed with cron since installing
NetBSD.


> BTW, in answer to the original question - I have a few jobs I start
> this way, and I don't have & at the end of any of them, eg:
> 
>    @reboot /usr/homes/laine/dorc5 >/dev/null 2>/dev/null
> 
> (dorc5 is a script that starts up the distributed.net client).

Thanks.  That's exactly what I wanted to know.

I suppose that I should have realized that if it didn't work that way, any
local user could effectively freeze cron (as could a careless error).  A
``fire and forget'' approach for cron is the only thing that makes sense.


Now, the other half (less urgent): Am I missing something in the
crontab(5) man-page?  Or the cron(1)?  While the behavior can be guessed
with a little thought (or deterimed from the source---or found by
consulting a mailing list), I cannot see that it is documented. Should I
send-pr it?  Or does someone with write access want to fix it
off-the-cuff?  (^&


  "I probably don't know what I'm talking about." --rauch@eecs.ukans.edu