Hi pals, Havn't used cron feature for quite some while, and knowing it has been under refactoring in recent several major versions of web2py. Today I try to pick it up, but then notice a warning message keeps showing up on console.
C:>web2py -a1 WARNING:root:no file locking Starting hardcron... WARNING:root:WEB2PY CRON: Disabled because no file locking WARNING:root:WEB2PY CRON: Disabled because no file locking And none of my cron jobs is fired. This is not like the old days. Oh, I miss them. I am using web2py source version, latest trunk, by python 2.5, on a Windows XP. Then I digged into the code a little, and found that is because I do not install python win32 extention, so gluon/portalockr.py defines portalocker.LOCK_EX==None, and for some reason since 1Mar2010 (http:// code.google.com/p/web2py/source/detail? r=5dd1e2b9c893ae04cba5af1d9b67dd79c2efed44&path=/gluon/contrib/ cron.py), cron.py requires a portalocker.LOCK_EX to work. So question 1: Is LOCK_EX necessary for cron to work? What is the downside if no lock is used? If the downside is acceptable (at least during development phase on Windows platform), can we have a command line option to simply turn off the lock check? Before that, the workaround is to use the windows binary package of web2py, which comes with the win32 extention inside. Question 2: If LOCK_EX is somehow necessary, can we design another lock mechanism to fully cross-platform? For example, use threading.Lock instead. I know this can not cross-process, but perhaps it serves as just a fallback option better than none. Regards, Iceberg -- You received this message because you are subscribed to the Google Groups "web2py-users" 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.

