Skip to content

Quick Celery Beat Test

One-Line Test Commands

# Django management command (recommended)
python manage.py test_celery_beat

# Standalone script
python test_beat_infrastructure.py

# Docker
docker compose exec api python manage.py test_celery_beat

Watch it work (3 terminals)

Terminal 1 - Run the test:

python manage.py test_celery_beat --minutes 3

Terminal 2 - Watch beat scheduler:

docker compose logs -f celery_beat

Terminal 3 - Watch worker:

docker compose logs -f celery_worker

What to expect in 3 minutes

Beat logs:

Scheduler: Sending due task test_celery_beat_20251014_153000

Worker logs:

Received task: tickets.task.send_show_reminder
Order with id 999999 does not exist  ← This is SUCCESS!

Cleanup

python manage.py test_celery_beat --cleanup

Full docs: See CELERY_BEAT_DEBUGGING.md