[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restart cron in Solaris

From: Ted Zlatanov
Subject: Re: restart cron in Solaris
Date: Fri, 14 Dec 2001 17:17:48 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-redhat-linux-gnu)

Marion Hakanson <address@hidden> writes:

> Darren Dunham wrote:
>> 1) Put crontab in tempfile.
>> 2) su $user "crontab tempfile"
>> 3) rm tempfile
>> . . .
>> Another alternative is more brute-force.
>> 1) Put the crontab(s) in place.
>> 2) Kill and restart cron.
> We have some old pre-cfengine code using "rdist" still lying around.
> In that old code, we did this (no temp file needed):
> 1) Put the crontab in place, /var/spool/cron/crontabs/$user
> 2) su $user -c "crontab /var/spool/cron/crontabs/$user"

OK, just to clear things up.

Half the admins say "put the crontab file in a separate location, not
in the cron spool, so it won't get overwritten."

The other half say "go ahead and put it in the spool."

I think both are viable approaches, but editing and storing the
crontab file in a location separate from the expected cron spool can
confuse users and cause their edits to be overwritten.  So I'd go with
editing the cron spool directly and then invoking crontab on it.

I posted my research on the crontab (fcrontab.c) that comes with
fcron, supporting the direct spool editing argument.  Does anyone have
evidence that some crontab implementations can delete or otherwise
lose crontab when invoked directly on the file in the cron spool?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]