Skip to content

axiaoxin/celery-periodic-tasks-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Celery periodic task demo

Run

cd into the root path of the project

  • run a celery worker to consume the tasks

    celery worker -A app -l debug

  • run a celery beat to produce the tasks periodically

    celery beat -A app -l debug

Add task

  1. Write the tasks code.

Write the new task code like print_tasks.py in the tasks directory.

For more information http:https://docs.celeryproject.org/en/latest/userguide/index.html

  1. Update config.py

Add the new task script into imports list, then set the new beat schedules like the print_tasks

For more information http:https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html

About

celery beat demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages