Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jul 2003 09:48:27 -0700
From:      Rich Morin <rdm@cfcl.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: crontab same time execution order
Message-ID:  <p05200f4fbb2cafac8255@[192.168.254.205]>
In-Reply-To: <20030705054337.21573.qmail@web41409.mail.yahoo.com>
References:  <20030705054337.21573.qmail@web41409.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 10:43 PM -0700 7/4/03, Dave McCammon wrote:
>Perhaps this predictable behavior is in FreeBSD only.
>(I don't have access to other platforms). Or perhaps
>my simple test was too simple. It just seemed to be
>too predictable to not at least try to get some feed
>back.

I'm not a big fan of programming to take advantage of undocumented
implementation details; they may change unexpectedly.  Why not:

   *  Write a wrapper script that does the desired ancillary actions,
      running the original command in the process:

         :
         # newsyslog_lcl - wrapper for newsyslog

         ... pre-actions ...

         newsyslog

         ... post-actions ...

   *  Change /etc/crontab to invoke newsyslog_lcl, rather than newsyslog

The usual caveats apply, of course, to writing root-level programs.

-r
-- 
email: rdm@cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com/rdm    - my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f4fbb2cafac8255>