Forum Discussion
Tim_Moomaw_9220
Nimbostratus
Nov 09, 2008Scheduled Maintenance Window
--- Obligatory "I'm new to iRules" ----
I'm trying to create a rule to return a maintenance page every Saturday morning between 0200 and 0600. I have copied a few examples ...
Tim_Moomaw_9220
Nimbostratus
Nov 14, 2008To Update - I have had no time to investigate this further, but I have put the following in place that works great for the purpose at hand, which is to return an outage page between 0200 and 0600 on Saturdays.
when HTTP_REQUEST {
set l [split [clock format [clock seconds] -format {%A %H}] " "]
if { ([lindex $l 0] eq "Saturday") &&
([lindex $l 1] >= 02) &&
([lindex $l 1] < 06) } {
HTTP::respond 200 content " -snip- Maintenance
text=800517>
- snip - is temporarily unavailable.
- snip - will be available again at 6:00am.
We are sorry for any inconvenience. "
}
}
This rule won't even compile if a "08" or "09" is used, but again, I don't need it to at the moment.
Thanks to all for the suggestions. If you have additional suggestions I greatly appreciate it!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects