Forum Discussion
schedule user access on the apm
Hi, Is it possible to set a schedule time on the APM? I would like to do that users only access internal resource for a spesific time. Thanks,
8 Replies
- Arnaud_Lemaire
Employee
Hello,
You have in the VPE (Visual Policy Editor) the ability to specify date and hour ranges to your policy. Is it what you are looking for or do you want to specify a duration ? like having access during x minutes to a site ?
- Rise_77519
Nimbostratus
Hi Amaud, Actually i am looking for a user only access the local network between a time range. Example a user only access the network between 19:00 - 21:00 . Thanks,
- Stanislas_Piro2
Cumulonimbus
I guess the need is to logout at 5:00 which is not available in VPE.
the only way is to evaluate the max session timeout (variable session.max_session_timeout) based on start time (session.user.starttime) like :
max timeout = 17:00 - starttime
- Cody_Green
Employee
If you want all session to terminate at 5:00 I would recommend a cron job that will run at 5 to terminate all APM session.
- Stanislas_Piro2
Cumulonimbus
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_Kacynski
Cirrostratus
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_Piro2
Cumulonimbus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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