Bird
0
0

You want Supervisor to manage three Python scripts on Raspberry Pi, restarting only the ones that crash without affecting others. What is the best configuration approach?

hard🚀 Application Q9 of 15
Raspberry Pi - Automation and Scheduling
You want Supervisor to manage three Python scripts on Raspberry Pi, restarting only the ones that crash without affecting others. What is the best configuration approach?
AUse a single script to launch all three and supervise that script only
BCombine all scripts into one program section and set <code>autorestart=true</code>
CDefine each script under separate [program:] sections with <code>autorestart=true</code>
DSet <code>autostart=false</code> for all scripts and restart manually
Step-by-Step Solution
Solution:
  1. Step 1: Understand Supervisor's process management

    Supervisor manages each [program:] independently.
  2. Step 2: Configure for selective restart

    Setting autorestart=true per program ensures only crashed scripts restart.
  3. Step 3: Avoid combining scripts

    Combining scripts or supervising a launcher script causes all to restart together.
  4. Final Answer:

    Separate [program:] sections with autorestart=true -> Option C
  5. Quick Check:

    Independent program sections allow isolated restarts [OK]
Quick Trick: Use separate [program:] blocks with autorestart for each script [OK]
Common Mistakes:
MISTAKES
  • Combining multiple scripts in one program section
  • Supervising a single launcher script for all
  • Disabling autostart and expecting auto-restarts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes