Hi Annet,

I'm also with webfaction and do my session cleanups like this: (this is one 
line in the crontab):

# Delete sessions that are older than 1 day from the disk.
18 1 * * * /usr/local/bin/python2.7 /home/my_username/webapps/my_w2p_app_dir
/web2py/web2py.py --nogui --no-banner -S  myweb2pyapp -M -R /home/
my_username/webapps/my_w2p_app_dir/web2py/scripts/sessions2trash.py -A -o -x 
86400 -f >> /home/my_username/logs/user/cronjobs/my_w2p_app.cron.log 2>&1

Works as expected... i.e. it starts up, runs for a couple of seconds and 
quits.

A couple of notes that might help...
1) Specify your python path fully.  cron on the servers will use the system 
default python and libraries unless you specify otherwise.
2) the --nogui flag (maybe that's waiting for some input?)
3) important! the -o switch (run once and exit)
4) again, to avoid complications, avoid using ~ and fully specify the paths 
to everything (the python executable, the web2py.py file, the 
sessions2trash script... everything)  I've had some weird issues in general 
with cron when using shortcuts in cron. 


HTH,
Jose C




-- 
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