Subject: Week-end overrides/multiple cron entries

From: Malte Weber <[email-masked]>
Date: Sat, 30 Jan 2010 09:50:53 +0100

Hi there,

we have been using argus for some time now and it has helped us a lot-
thanks to all the developers..

Now we have to monitor a new service which runs only Mon-Thu from 7 AM
to 4 PM and Fri 7 AM-12 PM. Our current approach to this looks as
follows:

===
Service Prog {
	command:	/usr/local/bin/monitor_batchlg.sh
	expect:	OK
	label:	dispo
	uname:	dispo
	cron "2 16 * * * 1-4" {
		expires:	54000
		func:	override
		mode:	manual
		text:	reorg
	}
	cron "2 12 * * * 5" {
		expires:	241200
		func:	override
		mode:	manual
		text:	reorg
	}
}
===

This works excellently from Monday thru Thursday, but the second override for the weekend is not honoured.
We are not really sure whether argus is able to handle two cron entries on a single service or not.

Can anybody provide us with a solution to this issue?

Thanks in advance,

Malte

---
Dipl.-Wirt.-Ing. Malte Weber VDI
-Geschäftsführer-

NetConsequence GmbH
Ingenieurbüro für Systemtechnik

Hausertorstraße 49
D-35578 Wetzlar

Tel. +49-6441-669141-0
Fax +49-6441-669141-1
E-Mail: [email-masked]

AG Wetzlar HRB 5420
Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte
Weber

---

From: Jeff Weisberg <[email-masked]>
Date: Sat, 30 Jan 2010 12:40:45 -0500

On 30 Jan, 2010, at 3:50, Malte Weber wrote:

> 	cron "2 16 * * * 1-4" {
> 	cron "2 12 * * * 5" {
>
> This works excellently from Monday thru Thursday, but the second  
> override for the weekend is not honoured.

you have too many *s, so your day-of-week is ignored.

	min hour day month day-of-week

you want:
	cron "2 16 * * 1-4"
	cron "2 12 * * 5"

or, if you are using the latest development code, you can say:

	Service Prog {
	    # ...

	    Schedule testing {
	        *		=> no
   		mon 0700 - 1600	=> yes
   		tue 0700 - 1600	=> yes
		wed 0700 - 1600	=> yes
   		thu 0700 - 1600	=> yes
		fri 0700 - 1200 => yes
	    }