crontab same time execution order

Rich Morin rdm at cfcl.com
Sat Jul 5 09:48:45 PDT 2003


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 at 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


More information about the freebsd-questions mailing list