I cannot think of any but, if you can, do not use this, it is
convoluted. Use

web2py.py -S app -M -R yourscript

instead

On Jan 22, 5:37 am, baloan <[email protected]> wrote:
> By searching for "exec_environment limitations" I found a recent
> thread pointing out to use
>
> import os
> os.chdir('/path/to/web2py/')
> from gluon.shell import env
> globals().update(env('you_app_name', import_models=True))
> # now do whatever you need you can use request, db, helpers, etc.
>
> when accessing database models from an external script. My application
> contains the web2py server and scripts run from cron (Task Scheduler)
> updating the database on a regular basis. One of the next steps is to
> add authentication to the web2py server. I am wondering what will
> happen to the independent script accessing the database tables. Will
> there be any restrictions?
>
> Regards, Andreas
> baloand (at) gmail.com
>
> PS: I second the motion to update the documentation crontab section to
> mention above code snippet.

-- 
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.

Reply via email to