Hi Henrik
would it possible to schedule a disable using the command-line ?
Something like
$BB $BBDISP "disable $MACHINE.$TEST $DURATION $START_OF_DISABLE"
Thanks in advance.
Regards,
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
Frédéric Mangeant wrote:
Hi Henrik
would it possible to schedule a disable using the command-line ?
Something like
$BB $BBDISP "disable $MACHINE.$TEST $DURATION $START_OF_DISABLE"
Thanks in advance.
Regards,
If its on a schedule why dont you use the DOWNTIME flags in the hosts file ? Can't remember if this stops it from alerting though but ive covered it anyway by putting in a time for a box for example that restarts every sunday at 10am the line reads like host=xyz.host.com mail=me at there.com time=*:1045:1000 so it will alert at all times between 1045 and 1000 which is kinda wacked but its the only way I figured out how to stop it :)
HTH
Allan
On Thu, Nov 24, 2005 at 02:48:44PM +0100, Frédéric Mangeant wrote:
would it possible to schedule a disable using the command-line ?
Something like
$BB $BBDISP "disable $MACHINE.$TEST $DURATION $START_OF_DISABLE"
There's a generic "schedule" command in the Hobbit protocol to do that. You can put a "schedule TIMESTAMP" in front of any command and Hobbit will execute that command at the requested time. TIMESTAMP is a Unix epoch time (seconds since Jan 1 1970). So your command would be:
STARTTIME=date +%s --date="$START_OF_DISABLE"
$BB $BBDISP "schedule $STARTTIME disable $MACHINE.$TEST $DURATION"
That is in fact how the scheduled enable/disable works when you use it via the Web GUI.
Henrik
participants (3)
-
allan@zandahar.net
-
frederic.mangeant@steria.com
-
henrik@hswn.dk