help-cfengine
[Top][All Lists]
Advanced

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

Re: Modifying Cron


From: Brian E. Seppanen
Subject: Re: Modifying Cron
Date: Fri, 17 Dec 2004 10:19:35 -0500 (EST)

On Fri, 17 Dec 2004 wbmccarty@gmail.com wrote:

> Hi Brian and all,
> 
> I'm unsure what risk concerns you. I use the following script to manage
> the system crontab:
> 
> > editfiles:
> >
> >     {   /etc/crontab
> >
> >         AutoCreate
> >         BeginGroupIfNoLineMatching '.*[ /]cfexecd( *.*|$)'
> >             Append '0,30 * * * * /usr/sbin/cfexecd -F'
> >         EndGroup
> >         ResetSearch '1'
> >         LocateLineMatching '.*[ /]cfexecd( *.*|$)'
> >         BeginGroupIfNoMatch '^0,30 * * * * /usr/sbin/cfexecd -F$'
> >             ReplaceLineWith '0,30 * * * * /usr/sbin/cfexecd -F'
> >         EndGroup
> >     }
> 
> Does this script entail some risk that I haven't considered?

It being /etc/crontab I don't think that it's necessarily risky.  Usually
the files in the cron spool directory is where I think there might be more
risk involved in causing corruption.  However, /etc/crontab would seem to
be linux specific.  I don't have an /etc/crontab on the solaris hosts I
manage, so I don't think it's completely portable to do it using that
method.

If I can use /etc/crontab on solaris, I'd be more than willing to give it 
a shot.   




Brian Seppanen
seppy@chartermi.net
906-475-0107 ext 1040




reply via email to

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