Forum Discussion
2 Replies
Sort By
- Lee_SutcliffeNacreous
Whilst it's possible, iRules are event driven so it's not very practical to schedule them to display something at a certain time. It might be easier to automate applying a different iRule to the virtual server at the times you want to display the maintenance page
- youssef1Cumulonimbus
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