run cron task in the morning

This commit is contained in:
j 2011-10-27 13:06:13 +02:00
commit 910b8426dc
3 changed files with 6 additions and 2 deletions

View file

@ -3,11 +3,12 @@
from datetime import timedelta
from celery.decorators import task, periodic_task
from celery.task.schedules import crontab
import models
@periodic_task(run_every=timedelta(days=1), queue='encoding')
@periodic_task(run_every=crontab(hour=6, minute=30), queue='encoding')
def update_all_matches(**kwargs):
ids = [p['id'] for p in models.Place.objects.all().values('id')]
for i in ids: