Django - Celery and Background TasksYou want a task to run every Monday at 8:30 AM using Celery Beat. Which schedule setting is correct?Acrontab(minute=30, hour=8, day_of_week=1)Bcrontab(minute=8, hour=30, day_of_week='mon')Ccrontab(minute=30, hour=8, day_of_week='mon')Dcrontab(minute=30, hour=8, day_of_week='1-5')Check Answer
Step-by-Step SolutionSolution:Step 1: Understand crontab parametersMinute=30, hour=8 means 8:30 AM; day_of_week='mon' means Monday.Step 2: Validate day_of_week formatUsing string 'mon' is valid; numeric 1 also works but string is clearer.Final Answer:crontab(minute=30, hour=8, day_of_week='mon') -> Option CQuick Check:Monday 8:30 AM = crontab with 'mon' and correct time [OK]Quick Trick: Use day_of_week='mon' with correct hour and minute [OK]Common Mistakes:MISTAKESSwapping hour and minute valuesUsing numeric day_of_week without quotes incorrectlyUsing day_of_week='1-5' for Monday only
Master "Celery and Background Tasks" in Django9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Django Quizzes Async Django - Async views basics - Quiz 9hard Async Django - Async views basics - Quiz 2easy Caching - Cache backends (memory, Redis, Memcached) - Quiz 15hard Celery and Background Tasks - Why background tasks matter - Quiz 14medium Celery and Background Tasks - Defining tasks - Quiz 15hard Celery and Background Tasks - Task results and status - Quiz 3easy Django REST Framework Basics - APIView for custom endpoints - Quiz 6medium Security Best Practices - SQL injection protection via ORM - Quiz 10hard Signals - pre_save and post_save signals - Quiz 3easy Signals - Signal dispatch process - Quiz 1easy