Forum Discussion
Stanislas_Piro2
Aug 04, 2015Cumulonimbus
or assign to variable session.max_session_timeout the following expression:
set endhour 17;
set endmin 00;
set starthour [clock format [mcget {session.user.starttime}] -format %H];
set startmin [clock format [mcget {session.user.starttime}] -format %M];
return [expr {( $endhour * 3600 ) + ( $endmin * 60 ) - ( $starthour * 3600 ) - ( $startmin * 60 )}]
- Walter_KacynskiApr 08, 2020Cirrostratus
Do you happen to know if this assignment must occur within the VPE (before the session transitions to allow)? Or is ACCESS_POLICY_COMPLETED safe?
I assume that the timeout is enforced in tmm (not apmd) so it shouldn't matter.
- Stanislas_Piro2Apr 08, 2020Cumulonimbus
Hi Walter,
This code is to be used in VPE variable assign box. The optimized code is:
expr { [clock scan "17:00"] - [mcget {session.user.starttime}] }
You can find more examples of variable assign expressions here
- Walter_KacynskiApr 08, 2020Cirrostratus
Thanks, I've confirmed that this must be set prior to Allow ending. Either thru VPE or ACCESS_POLICY_AGENT_EVENT if you already have iRules setup.