Xymon Mailing List Archive search

clientlaunch.cfg INTERVALs

7 messages in this thread

list Charles Jones · Tue, 19 Sep 2006 03:42:52 -0700 ·
I need to ext script to run every hour, exactly on the hour. Am I correct in assuming that if I use "INTERVAL 60m", that this simply launches that script every hour from when the hobbit client was started?

It would be nice if, INTERVAL had an extra option to indicated exactly when you wanted to launch, maybe even using a similar format to cron, ie:

INTERVAL 00 * * * *   would launch at the top of every hour
INTERVAL 30 06 * * * would launch at 6:30am daily

-Charles
list Francesco Duranti · Tue, 19 Sep 2006 12:45:52 +0200 ·
 
I need to ext script to run every hour, exactly on the hour. Am I correct in assuming that if I use "INTERVAL 60m", that this simply launches that script every hour from when the hobbit client was started?
Yes, it will launch the script one time when hobbitlaunch is started and
each interval after that.
list Charles Jones · Tue, 19 Sep 2006 03:48:37 -0700 ·
quoted from Francesco Duranti
Francesco Duranti wrote:
   
I need to ext script to run every hour, exactly on the hour. Am I correct in assuming that if I use "INTERVAL 60m", that this simply launches that script every hour from when the hobbit client was started?

    
Yes, it will launch the script one time when hobbitlaunch is started and
each interval after that.
That's what I figured, and is no good for this particular ext script that needs to run at the top of every hour. I suppose I could run it from cron instead.
list Buchan Milne · Tue, 19 Sep 2006 13:06:18 +0200 ·
quoted from Charles Jones
On Tuesday 19 September 2006 12:42, Charles Jones wrote:
I need to ext script to run every hour, exactly on the hour. Am I
correct in assuming that if I use "INTERVAL 60m", that this simply
launches that script every hour from when the hobbit client was started?

It would be nice if, INTERVAL had an extra option to indicated exactly
when you wanted to launch, maybe even using a similar format to cron, ie:

INTERVAL 00 * * * *   would launch at the top of every hour
INTERVAL 30 06 * * * would launch at 6:30am daily
Is there a reason you don't just run it out of cron? Eg

00 * * * * 
hobbit /path/to/hobbit/home/client/bin/bbcmd /path/to/hobbit/home/client/ext/myscript.sh

in /etc/crontab.


-- 
Buchan Milne
ISP Systems Specialist
B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
list Rolf Schrittenlocher · Tue, 19 Sep 2006 13:09:07 +0200 ·
Hi Charles,
quoted from Francesco Duranti
Francesco Duranti wrote:
I need to ext script to run every hour, exactly on the hour. Am I correct in assuming that if I use "INTERVAL 60m", that this simply launches that script every hour from when the hobbit client was started?

   
Yes, it will launch the script one time when hobbitlaunch is started and
each interval after that.
That's what I figured, and is no good for this particular ext script that needs to run at the top of every hour. I suppose I could run it from cron instead.
You've got it. Maybe you have to set some variables like
. $HOBBITCLIENTHOME/etc/hobbitclient.cfg
and/or read .profile.

-- 
Mit freundlichen Gruessen
Rolf Schrittenlocher

HRZ/BDV, Senckenberganlage 31, 60054 Frankfurt Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX - XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-6ea8e907e200@xymon.invalid
list Ralph Mitchell · Tue, 19 Sep 2006 06:11:03 -0500 ·
quoted from Charles Jones
On 9/19/06, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:
 That's what I figured, and is no good for this particular ext script that
needs to run at the top of every hour. I suppose I could run it from cron
instead.
I've had a lot of success running Big Brother scripts from cron.  I
now have a Hobbit server running for the display, but I haven't made
time to switch the scripts to the Hobbit environment.

I think you'd just need to:

   source /home/hobbit/server/etc/hobbitserver.cfg

at the top of the script, assuming it's sh-compatible...

Ralph Mitchell
list Henrik Størner · Wed, 20 Sep 2006 23:10:50 +0200 ·
quoted from Ralph Mitchell
On Tue, Sep 19, 2006 at 06:11:03AM -0500, Ralph Mitchell wrote:
On 9/19/06, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:
That's what I figured, and is no good for this particular ext script that
needs to run at the top of every hour. I suppose I could run it from cron
instead.
I've had a lot of success running Big Brother scripts from cron.  I
now have a Hobbit server running for the display, but I haven't made
time to switch the scripts to the Hobbit environment.

I think you'd just need to:

  source /home/hobbit/server/etc/hobbitserver.cfg

at the top of the script, assuming it's sh-compatible...
Please don't do that. As hobbitserver.cfg says:
  # NB : Even though it might look like a shell-script, it is NOT.

If you want to run scripts with the Hobbit environment set, use the
"bbcmd" utility. E.g. if your script is /usr/local/bin/myfancytest
then run it with
   bbcmd /usr/local/bin/myfancytest


Regards,
Henrik