Skip to content

Instantly share code, notes, and snippets.

@sweldon
Created March 13, 2020 20:58
Show Gist options
  • Save sweldon/9c3003496f4e0f0c0b5970950b17681c to your computer and use it in GitHub Desktop.
Save sweldon/9c3003496f4e0f0c0b5970950b17681c to your computer and use it in GitHub Desktop.
Celery Periodic Task in Django Example
from celery.decorators import periodic_task
from datetime import timedelta
@periodic_task(run_every=(timedelta(seconds=10)), name="my_task", ignore_result=True)
def my_task():
return "success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment