Forum Discussion
youssef1
Apr 02, 2019Cumulonimbus
Hi PC,
You can trig your maitenance page using Irule above:
when HTTP_REQUEST {
"clock seconds" will return the time in seconds
"clock format" will format the previous value with it's date/time components
split will chop the returned string into a list of elements.
set l [split [clock format [clock seconds] -format {%A %H}] " "]
Next add the time check logic:
This example will process the log statement on Sunday between 3 and 4am.
if { ([lindex $l 0] eq "Sunday") &&
([lindex $l 1] >= 3) &&
([lindex $l 1] < 4) } {
Put in iRule logic here
log local0. "processing iRule..."
}
}
For info i retrieve the irule in this post:
https://devcentral.f5.com/questions/schedule-an-irule-for-specific-date-time