Ładuję...
photo
zaloguj się i wrzuć coś ciekawego na flakera

wtorek 25 maja

aktywność użytkownika
photo
Django: the easiest way to run manage commands in crontab Sometimes there are some management commands I would like to run from crontab at given time or interval. There are some ways when you import setup_environ from Django but there is much simpler solution.
For example - Haystack search index update. Lets do it in one hour interval.
user@server:~$ crontab -l
PYTHONPATH=":/home/www/project/django/lib/python2.5/site-packages"
DJANGO_SETTINGS_MODULE=project.settings
# m h dom mon dow command
0 * * * * /home/www/project/manage.py update_index
So, all you need is to set PYTHONPATH and DJANGO_SETTINGS_MODULE according to your settings. And the trick is that it can be done in crontab.
Note that this was tested on Debian Linux. Zobacz wpis
  1.  
photo
seapomeranian:
mongoengine vs. django-mongokit - Peterbe.com (Peter Bengtsson on Python, Django, Zope, Kung Fu, London and photos) Zobacz wpis
seapomeranian:

mongoengine vs. django-mongokit - Peterbe.com (Peter Bengtsson on Python, Django, Zope, Kung Fu, London and photos)
  1.