> To do so, I suggest the welcome application should have its own cron/ > expire_sessions.py etc. Further more, every new applications generated > by admin should better have its own cron/expire_sessions.py too. One > thing might be tricky here: currently the cron/crontab hardcode the > app name, so it need to be modified when being deployed into a new > application. Is there a way to make a same crontab which can work > inside different app, Achipa?
Actually, that's already how expire_sessions.py work :) path=os.path.join(request.folder,'sessions') Hence it clears the session dir of whatever the request application is. All you need to copy is the crontab file, no need to modify anything on it, other than the reason that you need per-application specifics in the expire_sessions.py. I do agree that it would make sense to have expire_sessions as a default task for new web2py apps, but that's Massimo's call. As Markus pointed out, expire_sessions.py (which is just an example for cron, albeit a useful one :) ) only deals with disk based sessions. Not sure who's the original author, but patches for DB based sessions are welcome, I don't have a DB based session setup at hand and would like to avoid coding such thing 'blindly'. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---