On Tue, Dec 22, 2009 at 3:24 PM, Bill Freeman <ke1g...@gmail.com> wrote: > If you are calling this from, for example, crontab note that each line > in crontab is executed in its own subshell, so you have the choice of > setting PYTHONPATH, or (my personal favorite because it works with so > many kinds of scripts) you can cd to the project directory and execute > the script as ./manage.py custom, by separating the cd and ./manage.py > with a semicolon. Too, if you are doing this from a bash (or sh or, > probably, csh) script, commands run inside parentheses run in a sub > shell, so you can do the cd, semi, manage trick, and when the subshell > exits, the rest of your script is still running in its original > directory. Finally, if this is a command line utility that you want > to run from wherever and just have on the path, create a sh (or bash) > script that cd's and runs it instead, and put that on the path. This > last works on windows too, using bat files (or whatever the cmd.exe > equivalent is). >
Thanks Bill, I'd considered that route, but ultimately, I had a puzzle that needed solving. =) ~Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.