Re: Custom commands called outside project path

2010-02-10 Thread Tim Daniel
Thanks for the quick and helpful answers. On 9 feb, 19:37, Bill Freeman wrote: > If you're running on *nix (including Os/X, probably) you have a few options. > Someone else will have to help if it's Windows without cygwin. > > The easy way, if it does all that you need, is to deploy, instead of a

Re: Custom commands called outside project path

2010-02-10 Thread David De La Harpe Golden
(I'm not sure about that "root" in creecode's version. Editing crontab with crontab -e on a linux box has no user specification because it edits the crontab of the invoking user. Perhaps it's different for a directly edited root crontab.) The system-wide /etc/crontab is different to individu

Re: Custom commands called outside project path

2010-02-09 Thread Bill Freeman
Or: * * * * * (cd /path/to/you/project ; ./manage.py yourcommand) The parentheses probably aren't necessary since the entire command portion of the crontab entry is almost certainly run in one shell. (I'm not sure about that "root" in creecode's version. Editing crontab with crontab -e on a lin

Re: Custom commands called outside project path

2010-02-09 Thread creecode
Hello Tim, On Feb 9, 10:34 am, Tim Daniel wrote: > I'm trying to launch custom admin commands with a cron(outside the > project path). I'm running Django 1.1.1. I've tried to add the -- > pythonpath='path_to_my_project' option, but it doesn't work either. Have you tried something like... * * *

Re: Custom commands called outside project path

2010-02-09 Thread Bill Freeman
If you're running on *nix (including Os/X, probably) you have a few options. Someone else will have to help if it's Windows without cygwin. The easy way, if it does all that you need, is to deploy, instead of a python file a shell script. It can cd to the appropriate directory, then run the the a

Re: Custom commands called outside project path

2010-02-09 Thread Tim Daniel
Well I think I've made the trick: the option pythonpath accepts one parameter: PATH_TO_MY_PROJECT but without the project name itself. So if your projects name is my_project, my_project should not appear inside PATH_TO_MY_PROJECT . Sorry for the unnecessary posting, hope it'll be useful for somebod

Custom commands called outside project path

2010-02-09 Thread Tim Daniel
I'm trying to launch custom admin commands with a cron(outside the project path). I'm running Django 1.1.1. I've tried to add the -- pythonpath='path_to_my_project' option, but it doesn't work either. When I call path_to_my_project/manage.py my_command -- pythonpath='path_to_my_project' from insid