Forum Discussion
What_Lies_Bene1
Feb 11, 2013Cirrostratus
This is from Kevin Stewart and this thread: https://devcentral.f5.com/community/group/aft/2165776/asg/502273814. Hope it helps.
when RULE_INIT {
set static::not_before_time "10am today"
set static::not_after_time "5pm today"
}
when HTTP_REQUEST {
if { ( [expr [clock seconds] < [clock scan $static::not_before_time]] ) or ( [expr [clock seconds] > [clock scan $static::not_after_time]] ) } {
HTTP::respond 200 content "After hours - access disabled" "Connection" "Close"
}
}