Re: Custom Command as cron

2009-09-27 Thread pkenjora
Here is an example of a complete script that does this: http://blog.awarelabs.com/2007/using-django-models-in-batch-jobs/ You will need to know the complete path to Django. In the CRON you now do not need to set PYTHONPATH for Django because it is set in the actual script. -Paul On Sep 24, 10

Re: Custom Command as cron

2009-09-26 Thread Fangzx
Hi, I used ubuntu crontab to exec python script in my project. 1. In crontab, you can do like this: DJANGO_SETTINGS_MODULE=divo3.settings PYTHONPATH=/root/deploy # m h dom mon dow command 50 * * * * python /root/deploy/divo3/job.py 2. The job.py file must put in the root dir of django proj

Re: Custom Command as cron

2009-09-24 Thread Matt McCants
I knew this would happen as soon as I hit submit to make a fool of myself. So I tried to use: manage.py custom_command_name --pythonpath='/path/to/my/project' but that had not worked either. The real path to the project is: /home/webdev/django/fls but I failed to put in: manage.py custom_comm

Custom Command as cron

2009-09-24 Thread Matt McCants
Greetings all, I'm having an issue running a custom command as a cron. Most resources I've read have said that you can run your command from cron by simply using the following syntax: python manage.py custom_command_name Frustratingly, that does not work for me. It results in "Unknown command: