Bird
0
0

You defined a periodic task but it never runs. Which of these is a likely cause?

medium📝 Debug Q6 of 15
Flask - Background Tasks
You defined a periodic task but it never runs. Which of these is a likely cause?
AFlask app is running in debug mode.
BYou forgot to import Flask.
CCelery worker is not running.
DYou used a wrong HTTP method in Flask route.
Step-by-Step Solution
Solution:
  1. Step 1: Check task execution requirements

    Periodic tasks require a running Celery worker to execute.
  2. Step 2: Eliminate unrelated causes

    Flask debug mode, imports, or HTTP methods do not affect Celery task execution.
  3. Final Answer:

    Celery worker is not running. -> Option C
  4. Quick Check:

    Worker must run for tasks to execute [OK]
Quick Trick: No worker running means no task execution [OK]
Common Mistakes:
MISTAKES
  • Blaming Flask debug mode
  • Confusing Flask imports with Celery tasks
  • Thinking HTTP methods affect Celery tasks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes