help-cfengine
[Top][All Lists]
Advanced

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

Re: [Cfengine] Re: run only once when shedule if every 15 min?


From: Bas van der Vlies
Subject: Re: [Cfengine] Re: run only once when shedule if every 15 min?
Date: Wed, 18 Dec 2002 10:26:19 +0100

On 16 Dec 2002 16:32:00 -0500
"David J. Bianco" <address@hidden> wrote:

> On Mon, 2002-12-16 at 15:22, Wheeler, John wrote:
> > I run cfagent out of inittab via cfexecd. The schedule is every 15
> > minutes. Is there any easy way to get a command to run just once a day
> > in a given hour?
> > 
> > The problem I have is if I run:
> > 
> > shellcommands:
> >         hostblah.Hr02::
> >                 '/bin/echo "this is a test"'
> > 
> > I get the phrase repeated four time in that hour. 
> 
> Try:
> 
>       shellcommands:
>               hostblah.Hr02_Q1::
>                       '/bin/echo "this is a test"'
> 
> The extra "_Q1" means only if it's in the first quarter hour of Hr02.  
> Since this is run only once every 15 minutes anyway, this will make the
> command run exactly once every hour.
> 
>       David
> 
> -- 

What i have done is something similar. I use inport for this
purpose. If Daily is true it will also excecute statements in
hourly and quaterly. 

groups:
  # Time classes 
  #
  Daily         = ( Hr00.Min00_05 DTest )
  Hourly        = ( !Hr00.Min00_05 HTest Daily DTest )
  Quarterly     = ( Min15_20 Min30_35 Min45_50 Hourly QTest HTest )

control:
  schedule    = ( Min00_05 Min15_20 Min30_35 Min45_50 )  

import:
  Quarterly::
    $(BASE_DIR)/quarterly.cf

  Hourly::
    $(BASE_DIR)/hourly.cf

  Daily::
    $(BASE_DIR)/daily.cf




--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: address@hidden      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************



reply via email to

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