Hi there,
I still have no clue on this puzzle, but I start to suspect whether
all the difference are caused by how we build web2py.exe.
1. I tried winXP + web2py 1.59 source + Python2.5.4, with my general
test cases (quoted below), and see no cron effect at all. Later I
tried winXP + web2py 1.59 exe, still no cron at all.
Achipa, I assume you are using some latest trunk source of web2py,
therefore we are not in the same boat. Would you mind, to use EXACT
web2py 1.59 's web2py_src.zip and/or web2py_win.zip, and use my
previous general test case, to check the problem really-really exist
or not? And, anybody in this mail group who is using web2py 1.59 (not
trunk) and cron feature on Windows, please just drop a line about
whether your cron works.
2. I even managed to build my own web2py.exe with 1.59 source, by
py2exe 0.6.9, still no good news. By the way, I don't know how Massimo
build official web2py.exe, my building web2py.exe complains:
C:\web2py\dist>web2py -h
Traceback (most recent call last):
File "web2py.py", line 7, in <module>
NameError: name '__file__' is not defined
Google tells that py2exe does not like __file__, so I have to use
os.getcwd() to bypass that (not a decent solution).
3. Still remember that once I reported that my web2py_win.zip 1.56.4
can only have softcron instead of hardcron? The most weird things
happen when I incidentally drop my above homebrew web2py-1.59.exe into
the web2py-win.zip 1.56.4, and then this hybrid 1.56.4 suddenly has
the long lost hardcron feature. I can't explain.
All these look like mess. But I am really not joking although today is
Apr1. :-(
Sincerely,
Iceberg, 2009-Apr-01, 21:31(PM), Wed
On Mar30, 11:03pm, AchipA <[email protected]> wrote:
> Can't reproduce, apart from misplacing (back)slashes, not sure what it
> can be. :( Just tried under winXP, from 1.59 source + patch above,
> (even) with python 2.6. After that experiment I renamed the web2py dir
> to "web py" (note the whitespace) and it worked identically. Note that
> the we both mistyped the marker -> open("c:\\marker"... is the correct
> form).
>
> My tried and true crontab under windows:
> */1 * * * * root \python26\python
> applications\examples\cron\vazeg.py
>
> C:\web2py>\Python26\python.exe web2py.py -D 0
> WARNING:root:no file locking
> default applications appear to be installed already
> web2py Enterprise Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2009
> Version 1.59 (2009-03-16 13:10:16)
> Database drivers available: SQLite3
> choose a password:1
> please visit:
> http://127.0.0.1:8000
> use "kill -SIGTERM 1072" to shutdown the web2py server
> INFO:root:starting web server...
> INFO:root:SSL is off
> DEBUG:root:WEB2PYCRON: Trying to acquire lock
> DEBUG:root:WEB2PYCRON: Locked
> INFO:root:WEB2PYCRON(hard): Application: examples executing
> \python26\python a
> pplications\examples\cron\vazeg.py in C:\web2py at 2009-03-30
> 16:48:00.023000
> ...
>
> On Mar 30, 3:07 pm, Iceberg <[email protected]> wrote:
>
> > Try once more, still nocronat 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, ORIGINALcron.py. I create a brand new
> > "test" app, then add this stuff.
>
> > Incron/crontab:
> > */1 * * * * root
> > *applications/test/cron/trigger.py
>
> > Incron/trigger.py:
> > import urllib,logging,os,sys
t='http://127.0.0.1:8000/%s/default/
trigger'%request.application
> > 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 visithttp://127.0.0.1:8000/testseveraltimes, 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 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
-~----------~----~----~----~------~----~------~--~---