Thanks for the reply.  Let me provide more info. May be I missed something 
very basic. I am replying inline to your/Ricardo's comments.


"BTW..........you're 10 steps ahead.....but you're calling it wrongly :-P"
I guess I am calling it wrongly. Did not get the 10 steps ahead part

"the args of the script are.....
However, to launch a script using the app environment, web2py's syntax is"

I think this difference is what sends me down the wrong path

"If I'm not wrong your applications/myapp/sessions directory only have 2 
entries,
and they are the "." and "..", so your session dir is empty."

But I did have entries going till beginning of January. I used the -o -x 
3600 and they disappeared. So my question about the basic behaviour - 
I am using db auth. So once a user logs in, there is an entry in the 
auth_event table. If the user quits without logging out, obviously there is 
no entry for 'log out'. In such a scenario, will the script delete session 
files?

On Thursday, February 6, 2014 3:35:23 AM UTC+5:30, Niphlod wrote:
>
> BTW..........you're 10 steps ahead.....but you're calling it wrongly :-P
>
> the args of the script are 
>
> -f --> ignores session expiration (deletes either via -x or 
> auth.settings.expiration)
> -o --> does an execution then exits
> -s --> sleep (in case -o isn't passed and the script is always "alive")
> -v --> verbose mode. -vv for "ultraverbose"
> -x --> sets expiration in seconds (ignoring auth.settings.expiration)
>
> However, to launch a script using the app environment, web2py's syntax is
>
> web2py.py 
> -M # load models
> -S appname # "shell mode"
> -R # path to the script to execute
> -A # pass any following argument to the actual script
>
>
> So, in the end, what you should launch as 
>
> python sessions2trash.py -vv -o
>
> to have it running once (-o) and spit out every debug message possible 
> (-vv), in web2py's "shell mode" is
>
> python web2py.py -M -S appname -R scripts/sessions2trash.py -A -vv -o
>
> to load models (-M), load apps shell (-S appname), execute the script (-R 
> scripts/sessions2trash.py), pass any following argument to the script (-A), 
> spit out verbose messages (-vv), exit after a single loop (-o)
>
> All of this is extensively documented both in the book and in the 
> docstring of the session2trash.py script itself
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to