Bird
0
0

Why might this cron job fail to run?

medium📝 Debug Q7 of 15
Raspberry Pi - Automation and Scheduling
Why might this cron job fail to run?
30 7 * * * python3 /home/pi/script.py
ACron cannot run python scripts
BMinute 30 is invalid
CThe command should be in quotes
DThe full path to python3 is missing
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment in cron

    Cron runs with limited environment, so commands need full paths.
  2. Step 2: Check the command

    Using just 'python3' may fail if cron can't find it; full path like /usr/bin/python3 is needed.
  3. Final Answer:

    The full path to python3 is missing -> Option D
  4. Quick Check:

    Use full paths in cron commands [OK]
Quick Trick: Always use full paths for commands in cron [OK]
Common Mistakes:
MISTAKES
  • Assuming cron has same PATH as user
  • Thinking minute 30 is invalid
  • Believing cron can't run python

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes