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 ...
hwidjaja_37598
Altostratus
Nov 09, 2008Try this workaround out:
Use this:
regexp {(\d+)\s+0*(\d+)\s+0*(\d+)} \
[clock format [clock seconds] -format {%u %H %M}]\
match cur_day Hour Min
set cur_time [expr ($Hour * 100) + $Min]
Replacing this:
set l [split [clock format [clock seconds] -format {%A %H %M}] " "]
set cur_day [lindex $l 0]
set cur_time [expr [expr {[lindex $l 1] *100}] + [lindex $l 2]]
It looks like the split from clock produces invalid octal value in Tcl (eg. 08 and 09).
Any solution without regex or correction are welcome
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