Created
March 18, 2014 18:46
-
-
Save mpolden/9626716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from celery import Celery | |
from celery.schedules import crontab | |
app = Celery() | |
app.conf.CELERY_TIMEZONE = 'Europe/Oslo' | |
app.conf.CELERYBEAT_SCHEDULE = { | |
'every-minute': {t | |
'task': 'tasks.add', | |
'schedule': crontab(minute='*/1'), | |
'args': (1, 2), | |
}, | |
} | |
@app.task | |
def add(x, y): | |
return x + y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment