quick question reply: schedule a repeating task that clears up completed 
tasks

more complicated: this is just a matter of OS semantics. Your app isn't the 
boss of the operating system. The user is (usually the one starting the 
app). 
If I choose to kill an app (e.g. kill -9 or something along with that) 
there's no way for the executable to execute ANY instruction following that 
"killswitch". Intercepting "lighter" kill commands (e.g. kill) is doable 
but still leaves up the previous case. if it's a matter of security, you'd 
likely do not want to store anything sensitive into the session. There's no 
way around it and it's not web2py's or python's fault: it'd be the same 
with every program written on any language.

On Saturday, January 9, 2016 at 6:30:12 PM UTC+1, Herwig Gans wrote:
>
> Hi
>
> *there is a quick question:*
> is there a built in process within web2py to cleanup (truncate) the 
> scheduler DB tables e.g. with every app/web2py restart?
> Could not find anything in the documentation...
>
> I just started to develop a standalone desktop webapp with web2py, so a 
> scheduler content cleanup on closing/starting the app make sense here...
>
> *the more complicated question:*
> Related to that, a second requirement would be clearing all saved web2py 
> session variable information on the file system.
> I understand that usually it is intended to keep session information as 
> long as possible in a public webapp, in my case for security reason it is 
> necessary to delete session information when the app is stopped - because 
> it runs on a client host.
> To do so, I tend to create a web2py cron function, but it looks like the 
> "@reboot" keyword only triggers on web2py startup and not on closure.
> The problem is obvious: It is not easy to delete this data within web2py 
> runtime because of the nature of a webapp and the user can terminate web2py 
> without proper closure procedures...
>
> Any ideas how I could delete all content in the "session" folder of my app 
> before web2py is terminated?
> Thanks for any hints in advance!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to