Hi all I added a cron task like this:
web2py$ cat applications/everule/cron/crontab */2 * * * * root *everulecron/ download_upstream The function: def download_upstream(): query = (db.upstreamse.status == 'pending') rows = db(query).select(db.upstreamse.ALL) for row in rows: id = row['id'] ret = do_somethin() if ret == 0: print "Update status..." db.upstreamse[id] = dict (status='downloading') Then I call it by: ./web2py.py -P -N -M -S everule/everulecron/download_upstream -a 'recycle' Then I can see the out put of "Update status...", but when I goto manage ui, the 'status' still remain the old value. But if I call everulecron/download_upstream from browser, it do ok, why? Thanks for any comments. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---