when

Description

Used to specify an event in an iRule. All BIG-IP 9.X iRules begin with a when command. You can specify multiple when commands within a single iRule.

Syntax

when <event_name> [timing on|off] [priority N]

when <event_name>

  • Used to specify an event in an iRule.
  • timing and priority are optional parameters which can enable|disable timing and set the priority for the declared event.

Examples

when CLIENT_ACCEPTED {
  if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
     pool my_pool
 }
}