Sure. My crontab:
#0-59/1 * * * * root python /path/to/python/script #10 * * * * root *applications/admin/cron/expire_sessions.py # Some more comments here are in Chinese, but I omit them here. Should not matter. */1 * * * * root *applications/myapp/cron/trigger.py My trigger.py (a debugging version): import urllib,logging,os,sys try: request except: # Just for test class Dummy(object): pass request=Dummy() request.application=request.server_port='test' # At least when triggered by softcron, # request.env.http_host is ALWAYS 127.0.0.1:8000 # rather than the real server addr and port of main web2py process :-/ t='http://127.0.0.1:8000/%s/default/trigger'%request.application logging.debug('trigger.py(#%d): %s VS %s, visiting %s'%( os.getpid(),request.server_port,sys.argv,t)) urllib.urlopen(t).read() A more clean trigger.py: import urllib t='http://127.0.0.1:8000/%s/default/trigger'%request.application urllib.urlopen(t).read() On Mar24, 11:53pm, AchipA <attila.cs...@gmail.com> wrote: > Still undecided on this one. Can you post your crontab here just so I > don't miss something obvious ? > > On Mar 19, 11:30 am, Iceberg <iceb...@21cn.com> wrote: > > > Hi Achipa, > > > I have an app based on web2py-win.zip 1.56.4's cron feature. I just > > noticed that, if the whole web2py is deployed in a directory name with > > space inside, such as C:\Program Files\web2py, the cron feature does > > not work, instead I saw one line appeared on the console: > > WARNING:root:WEB2PY CRON Call returned code 1: > > > If I deploy it in C:\SOLID\web2py, everything runs smooth. > > > So there might be some dir issue in cron's launcher. Please take a > > look. Thanks in advance! > > > Regards, > > Iceberg --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---