From 67baad6f7d987883b7b5ba6223d7826bde440905 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 16 Nov 2012 11:47:37 +0200 Subject: Use timedelta instead of crontab for scheduling --- tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index e65a256..5ece5fc 100644 --- a/tasks.py +++ b/tasks.py @@ -1,14 +1,14 @@ import logging from celery import Celery -from celery.schedules import crontab +from datetime import timedelta celery = Celery('tasks', broker='redis://localhost') CELERYBEAT_SCHEDULE = { 'every-ten-secs': { 'task': 'tasks.print_fib', - 'schedule': crontab(minute='*/1'), + 'schedule': timedelta(seconds=10), 'args': (30), }, } -- cgit v1.3.1