Forum Discussion
JCMATTOS_41723
Nimbostratus
Sep 11, 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 certain times of the day(s). What would be the best way to address this in an iRule or not? Or is this even possible?
3 Replies
- The_Bhattman
Nimbostratus
Hi JC,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 } }
- The_Bhattman
Nimbostratus
There appears to be space between %s where there shouldn't be.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 } }
- hoolio
Cirrostratus
Here are a few other related posts which may give you guys ideas:
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