controlling service schedule

Matt.A.Cleveland at healthnet.com Matt.A.Cleveland at healthnet.com
Thu Mar 8 11:48:52 EST 2007


I have been able to get part-way there with a config like the following,
but I think there is one last issue to solve.

group "Test" {
    Service Prog {
    command: echo 123
    expect: 123
    debug: true
    frequency: 60
    cron "5,10,15,20,25,30,35,40,45,50,55,60 * * * *" {
        func: setparam
        param: srvc::disabled
    }
    cron "1,6,11,16,21,26,31,36,41,46,51,56 * * * *" {
        func: setparam
        param: srvc::disabled
        value: disabled temporarily by cron job
    }
}

How can I ensure that the Service comes up in disabled status and doesn't
accidentally fire before the first cron by virtue of its phase?  I've tried
using runatstartup with an argusctl command, but it just hangs.  It appears
that Argus is not ready to take commands at the moment when runatstartup is
processed.

I've also considered making a subclass of Prog or something like that to
introduce a cronspec attribute, and override the scheduling logic.  But I'm
not good enough with perl to figure it out.  I'm guessing it could be
accomplished with about 10 lines of code and a load_modules directive in my
config, but can't really figure it out.

...Matt Cleveland
...Web Architect
...Health Net Inc
...916.935.1248
...matt.cleveland at healthnet.com

* There's no place like 127.0.0.1



                                                                           
             Jeff Weisberg                                                 
             <jaw+arguslist at tc                                             
             p4me.com>                                                  To 
             Sent by:                  arguslist at tcp4me.com                
             arguslist-bounces                                          cc 
             @tcp4me.com                                                   
                                                                   Subject 
                                       Re: controlling service schedule    
             03/07/2007 05:15                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             Discussion about                                              
                   Argus                                                   
             <arguslist at tcp4me                                             
                   .com>                                                   
                                                                           
                                                                           





| Does anyone know of a hack or other mechanism I can use to control
exactly
| when a service runs?  I have a couple of costly tests that I would like
to
| run only during the night, and preferably on a specific schedule.  I know
| how to use cron to override on a schedule, but this doesn't prevent
| execution.  I have considered doing a check-now via a cron, but in order
| for this to work I would need to prevent the service from running on any
| schedule.  Is this possible?  Any other ideas?


there isn't any way to exactly control argus's scheduling, but using
argusctl (et al) you can adjust the parameter 'srvc::disabled'. if
it is set, the tests will be skipped.

I imagine you could toggle it on and off via cron to get
close to the effect you want.

_______________________________________________
http://argus.tcp4me.com/
Arguslist at tcp4me.com
http://www.tcp4me.com/mailman/listinfo/arguslist




---------------------------------------------------------------------
This message, together with any attachments, is
intended only for the use of the individual or entity
to which it is addressed. It may contain information
that is confidential and prohibited from disclosure.
If you are not the intended recipient, you are hereby
notified that any dissemination or copying of this
message or any attachment is strictly prohibited. If
you have received this message in error, please notify
the original sender immediately by telephone or by
return e-mail and delete this message, along with any
attachments, from your computer. Thank you.

---------------------------------------------------------------------


More information about the Arguslist mailing list