After web2py upgrade behavior has changed. I was running the command: python /home/www-data/web2py/web2py.py -J -S app -M -N -R applications/app/ private/cron_test.py
This is not working anymore because -N is not recognized. After removing -N, cron script is not executed, I get this instead: Python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> After removing -J, script starts to work. I am repeating the question from the last time: How should I run it? Dana petak, 7. rujna 2012. 11:51:29 UTC+2, korisnik Marin Pranjić napisao je: > > I want to run a script once a day. I need to execute models. > > I tried with: > > 0 0 * * * python /path/to/web2py.py -S app -M -N -R applications/app/ > private/cron_test.py >> cron.txt 2>&1 > > > And this *works*. > > But I see web2py has some flags and I am not sure should I use them or > not. Does it matter? > > -J, --cronjob identify cron-initiated command > -C, --cron trigger a cron run manually; usually invoked froma > system crontab > > Do they change anything? > > > Another question... My cron.txt is full of: > web2py Web Framework > Created by Massimo Di Pierro, Copyright 2007-2012 > Version 2.0.7 (2012-09-04 17:58:46) stable > Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb > ), PostgreSQL(pg8000), CouchDB(couchdb), IMAP(imaplib) > > I would like to remove this but if I run with -Q flag, then I can't see > script output and I cannot see the traceback if there is an exception. > > Any suggestions? > > --

