Skip to content

Instantly share code, notes, and snippets.

@mpolden
Created March 18, 2014 18:46
Show Gist options
  • Save mpolden/9626716 to your computer and use it in GitHub Desktop.
Save mpolden/9626716 to your computer and use it in GitHub Desktop.
#!/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