Try once more, still no cron at all.  :-(

I describe what I did here, so you can try to reproduce all my test,
to see whether it will be any different at your machine.

I am now using Windows XP Home Edition (should not matter), Python
2.5.4, web2py source 1.59, ORIGINAL cron.py. I create a brand new
"test" app, then add this stuff.

In cron/crontab:
  */1   *       *       *       *       root *applications/test/cron/trigger.py

In cron/trigger.py:
  import urllib,logging,os,sys
  urllib.urlopen(t).read()

In controllers/default.py:
  def index(): return {}
  def trigger():
    import logging,time
    logging.warn('Fired')
    open("C:\marker","a").write('%s\r\n'%time.ctime())

Then, I visit http://127.0.0.1:8000/test several times, once per
minute, but see no C:\marker at all. If I visit 
http://127.0.0.1:8000/test/default/trigger,
it can be manually triggered.

>_<

On Mar30, 7:03pm, AchipA <[email protected]> wrote:
> Can you check if the cron tasks really-really aren't executed as per
> 1.1 ? Logging can play tricks on you in hardcron mode, as a lot of
> things happen in separate threads. The easiest way is to do something
> like open("C:\marker","w") and check if it got created or, if it does
> not annoy you, winsound.Beep(400,400).
>
> On Mar 29, 9:08 am, Iceberg <[email protected]> wrote:
>
> > Hi Achipa,
>
> > Sorry for delay in response. I managed to upgrade my Python2.4.4 to
> > Python2.6.1 just now, so finally I can play web2py from source. Then I
> > try your patch. The result is, mmmmmm, very strange.
>
> > 1. First I am using Windows XP Home edition, Python 2.6.1, web2py
> > source 1.59, ORIGINAL cron.py (trying to reproduce the problem, but):
>
> > 1.1 I start "web2py.py -a1 -D0" but surprisingly see that cron jobs
> > are not invoked at all.  Not any cron-relative info is showed on the
> > console, either.   :-o
>
> > 1.2 However, manually execute "web2py.py -C -D0", the external cron
> > can work, NO MATTER the web2py is deployed in a directory with or
> > without white space inside its path.    :-/
>
> > 2. Then, I try using same infrastructure as above, but replace the
> > cron.py with your patch. Situation is same as above.
>
> > 3. Later I give up Python2.6.1, reinstall a Python 2.5.4, then redo
> > all the test above. Results remain the same.
>
> > What should I do now?
>
> > Sincerely,
> >              Iceberg, 2009-Mar-29, 14:19(PM), Sun
>
> > On Mar25, 9:56pm, AchipA <[email protected]> wrote:
>
> > > Ok, could you try replacing your web2py/gluon/contrib/cron.py with
>
> > >http://bazaar.launchpad.net/%7Eachipa/web2py/cron/download/head%3A/cr...
>
> > > and report back if this makes any difference ?
--~--~---------~--~----~------------~-------~--~----~
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