[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Command-line scheduled disable
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Command-line scheduled disable
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Thu, 24 Nov 2005 23:34:07 +0100
- References: <4385C4BC.8070005@steria.com>
- User-agent: Mutt/1.5.9i
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