Ok, could you try replacing your web2py/gluon/contrib/cron.py with

http://bazaar.launchpad.net/%7Eachipa/web2py/cron/download/head%3A/cron.py-20090112034952-715v6lgr679gwzuf-7/cron.py

and report back if this makes any difference ?

On Mar 25, 5:03 am, Iceberg <[email protected]> wrote:
> 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 <[email protected]> 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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to