Hi,
I need to be able to specify a calendar date and time for my maintenance window rather than a recurring day of the week. To do this I have attempted to use the iRule that Johan suggested above on 3/10/2011. I modified it slightly so that a particular pool will be used during my maintenance window -- see below for my rule. HOWEVER, when I test the rule it fails to take effect!!! Any suggestions would be much appreciated.
Thanks, Jonathan
Note syntax is "date/month hour:minute"; and hour should NOT start with zero.
when HTTP_REQUEST {
set start "29/5 18:45"
set end "29/5 18:50"
scan [clock format [clock seconds] -format {%m %d %k %M}] {%d %s %s %s} cur_month cur_day cur_hour cur_minute
scan $start {%d/%d %d:%d} start_day start_month start_hour start_minute
scan $end {%d/%d %d:%d} end_day end_month end_hour end_minute
set start {expr (${start_month}000000 + ${start_day}0000 + ${start_hour}00 + ${start_minute} )}
set end {expr (${end_month}000000 + ${end_day}0000 + ${end_hour}00 + ${end_minute} )}
set cur_time ${cur_month}${cur_day}${cur_hour}${cur_minute}
if { $cur_time >= $start and $cur_time < $end} {
pool MAINT-POOL
}
}