Forum Discussion
JCMATTOS_41723
Nimbostratus
Sep 10, 2009Time of day loadbalance?
Hi we have an LTM 9.4.7 and wanted to see if it was possible to do a scheduled loadbalance based on time of day? In other words we would not want to loadbalance to a certain leg (pool member) during c...
The_Bhattman
Nimbostratus
Sep 10, 2009Hi JC,
I suppose it's possible. The iRule code could look something like the following:
when HTTP_REQUEST {
set day "Thursday"
set starttime "2100"
set stoptime "2200"
Look for the current date of when the irule was processed
scan [clock format [clock seconds] -format { %A %H%M}] %s %s curday curtime
if {($day eq $curday) && ($curtime >= $starttime) && ($curtime <= $stoptime) } {
Code here will execute based on the day of time you want to execute this code
pool my_Pool member 10.1.2.200 80
}
}
I haven't testing this code out but I think it could be the bases of what you are looking for.
I hope this helps
CB
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