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